User Tools

Site Tools


vim:config:indentation

Differences

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

Link to this comparison view

Next revision
Previous revision
vim:config:indentation [2022/10/08 13:41] – created petervim:config:indentation [2022/10/08 17:28] (current) peter
Line 1: Line 1:
 ====== VIM - Config - Indentation ====== ====== VIM - Config - Indentation ======
  
-<file ~/.vimrc> +The indent features of Vim are very helpful for indenting source code.
-:set shiftwidth=2 +
-:set autoindent +
-:set smartindent +
-</file>+
  
-<WRAP info> +----
-**NOTE:**+
  
-  **set expandtab** allows to replace the tabs by white spaces characters :h 'expandtab'.+  * [[VIM:Config:Indentation:Indentation Options|Indentation Options]]
  
-  **set shiftwidth=2** makes the tabulations be 2 white spaces :h 'shiftwidth'.+  * [[VIM:Config:Indentation:Automatic Indentation Methods|Automatic Indentation Methods]] 
 +  [[VIM:Config:Indentation:File type based indentation|File type based indentation]]
  
-</WRAP>+  * [[VIM:Config:Indentation:Indentation purely with hard tabs|Indentation purely with hard tabs]] 
 +  * [[VIM:Config:Indentation:Indentation with mixed tabs and spaces|Indentation with mixed tabs and spaces]] 
 +  * [[VIM:Config:Indentation:Indentation with spaces|Indentation with spaces]]
  
 +----
 +
 +===== To get help =====
 +
 +<code>
 +:help autoindent
 +:help smartindent
 +</code>
 +
 +----
 +
 +===== References =====
 +
 +https://vim.fandom.com/wiki/Indenting_source_code#Methods_for_automatic_indentation
vim/config/indentation.1665236513.txt.gz · Last modified: 2022/10/08 13:41 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki