vim:config:indentation:indentation_options
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
vim:config:indentation:indentation_options [2022/10/08 14:17] – peter | vim:config:indentation:indentation_options [2022/10/08 14:21] (current) – peter | ||
---|---|---|---|
Line 15: | Line 15: | ||
* It also affects how automatic indentation works. | * It also affects how automatic indentation works. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== smarttab ===== | ||
+ | |||
+ | **smarttab** affects how <TAB> key presses are interpreted depending on where the cursor is. | ||
+ | |||
+ | * If **smarttab** is on, a <TAB> key inserts indentation according to **shiftwidth** at the beginning of the line, whereas **tabstop** and **softtabstop** are used elsewhere. | ||
+ | * There is seldom any need to set this option, unless it is necessary to use hard TAB characters in body text or code. | ||
---- | ---- | ||
Line 28: | Line 37: | ||
---- | ---- | ||
- | ===== **tabstop** ===== | + | ===== tabstop ===== |
**tabstop** changes the width of the TAB character, plain and simple. | **tabstop** changes the width of the TAB character, plain and simple. | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * Using a **tabstop** value other than the default (8 spaces), will result in your file having a different appearance when using tools such as cat (type on Windows), which cannot use a custom width tab character. | ||
+ | * On the other hand, using hard tabs for indentation, | ||
+ | * Which of these considerations should have priority, is a matter of personal preference (and company policy). | ||
+ | |||
+ | </ | ||
---- | ---- | ||
vim/config/indentation/indentation_options.1665238675.txt.gz · Last modified: 2022/10/08 14:17 by peter