]> code.delx.au - dotfiles/blob - .vim/indent.vim
Vim config improvements
[dotfiles] / .vim / indent.vim
1 " Indentation
2
3 " Automatically continue indentation across lines
4 set autoindent
5 " Keep indentation structure (tabs, spaces, etc) when autoindenting.
6 set copyindent
7 " Automatically indent new lines after specific keywords or braces
8 set smartindent
9 " Indent if the line starts with these words
10 set cinwords+=def,class,except,try
11 " Don't jump to the start of a line when typing #
12 inoremap # X<c-h>#
13
14 " Tab stuff
15 " Size of a \t
16 set tabstop=4
17 " Delete this many space chars when pressing backspace
18 set softtabstop=4
19 set shiftwidth=4
20
21 " set [no]expandtab to [not] use spaces
22 "function SetTabs(n)
23 " exec "set tabstop=" . a:n
24 " exec "set softtabstop=" . a:n
25 " exec "set shiftwidth=" . a:n
26 "endfunction
27
28 " Use :retab to change the file to entirely space indents
29 " Use :retab! to change the file to entirely tab indents
30