Indentation plugin¶
Choose how indentation works and adjust the indentation of selected lines.
Where to find it¶
Edit ▸ Indent:
- Increase Indent —
Ctrl+] - Decrease Indent —
Ctrl+[
Both act on every line touched by the selection, or the caret's line when nothing is selected.
Settings¶
Open Preferences ▸ Plugins ▸ Indentation:
- Indent style — Tabs, Spaces, or Auto (detect from document).
- Tabs (the default for new files) inserts a real tab per level.
- Spaces inserts Spaces per indent spaces per level.
- Auto looks at the document's existing indentation and follows it — a tab-indented file keeps using tabs, a 2-space file keeps using two spaces, and so on. A file with no indentation yet falls back to the default (tabs).
- Spaces per indent — how many spaces make up one indent level (also the visual width of a tab).
The chosen style is the single source of truth for the whole editor: the Tab key, Backspace unindent, and automatic indentation all use it.
Automatic indentation¶
Pressing Enter carries the current line's leading whitespace onto the new line, so you stay at the same depth without re-typing tabs or spaces. When the caret sits between a freshly opened bracket pair, the block opens out:
The new line is indented one level deeper and the closing brace drops to its own
line at the opener's depth. Automatic indentation stands down inside comments and
string literals, where a { is ordinary text rather than a block opener.
A project's .editorconfig and a
language's shipped indent default (Python → 4 spaces, Go → tabs, …) both take
precedence over the global style chosen here — see
per-language defaults
for the table and the full resolution order.
Related¶
For the full editing behaviour — auto-pairing brackets/quotes, type-over, deleting an empty pair, block-open on Enter, comment/string suppression and multi-caret support — see Auto-pair & indentation.