vim:config:indentation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
vim:config:indentation [2022/10/08 14:30] – peter | vim:config:indentation [2022/10/08 17:28] (current) – peter | ||
---|---|---|---|
Line 13: | Line 13: | ||
* [[VIM: | * [[VIM: | ||
* [[VIM: | * [[VIM: | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | ---- | ||
- | |||
- | ---- | ||
- | |||
- | |||
- | |||
- | <file ~/ | ||
- | :set shiftwidth=2 | ||
- | :set autoindent | ||
- | :set smartindent | ||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE:** | ||
- | |||
- | * **set expandtab** allows to replace the tabs by white spaces characters :h ' | ||
- | |||
- | * **set shiftwidth=2** makes the tabulations be 2 white spaces :h ' | ||
- | |||
- | * **set autoindent**: | ||
- | * **autoindent** essentially tells vim to apply the indentation of the current line to the next (created by pressing **< | ||
- | |||
- | * **set smartindent**: | ||
- | * **smartindent** reacts to the syntax/ | ||
- | * When having it on you also should have autoindent on. | ||
- | * **:help autoindent** also mentions two alternative settings: | ||
- | * **cindent** and **indentexpr**, | ||
- | |||
- | * You could also be interested by by :h ' | ||
- | |||
- | * As a bonus see :h ' | ||
- | |||
- | </ | ||
---- | ---- |
vim/config/indentation.1665239413.txt.gz · Last modified: 2022/10/08 14:30 by peter