User Tools

Site Tools


vim:config:indentation:indentation_options

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vim:config:indentation:indentation_options [2022/10/08 14:17] petervim: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:**  Considerations:
 +
 +  * 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, allows others to view your code with the amount of indentation they prefer.
 +    * Which of these considerations should have priority, is a matter of personal preference (and company policy). 
 +
 +</WRAP>
  
 ---- ----
  
vim/config/indentation/indentation_options.1665238675.txt.gz · Last modified: 2022/10/08 14:17 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki