diff options
author | Brett Cannon <bcannon@gmail.com> | 2006-04-24 20:01:24 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2006-04-24 20:01:24 (GMT) |
commit | 1b283c5bcce08dcda96a0fc86af5b10682f3baa3 (patch) | |
tree | f72ca3a8d42220bdd0dbd794a5c6d2301f169343 /Misc/Vim | |
parent | d624f18a2167daeabc85c1fef7e71dbc93daf5b5 (diff) | |
download | cpython-1b283c5bcce08dcda96a0fc86af5b10682f3baa3.zip cpython-1b283c5bcce08dcda96a0fc86af5b10682f3baa3.tar.gz cpython-1b283c5bcce08dcda96a0fc86af5b10682f3baa3.tar.bz2 |
Change C code to use 4-space indents.
Highlighting tab indents is off at the moment since that would be rather noisy,
but should be turned on in the future when conversion to the new indentation
style has been done.
Diffstat (limited to 'Misc/Vim')
-rw-r--r-- | Misc/Vim/vimrc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Misc/Vim/vimrc b/Misc/Vim/vimrc index 7cd33db..2d70699 100644 --- a/Misc/Vim/vimrc +++ b/Misc/Vim/vimrc @@ -19,9 +19,8 @@ " Number of spaces to use for an indent. " This will affect Ctrl-T and 'autoindent'. " Python: 4 spaces -" C: tab (8 spaces) -au BufRead,BufNewFile *.py,*pyw set shiftwidth=4 -au BufRead,BufNewFile *.c,*.h set shiftwidth=8 +" C: 4 spaces +au BufRead,BufNewFile *.py,*pyw,*.c,*.h set shiftwidth=4 " Number of spaces that a pre-existing tab is equal to. " For the amount of space used for a new tab use shiftwidth. @@ -32,16 +31,17 @@ au BufRead,BufNewFile *py,*pyw,*.c,*.h set tabstop=8 " Replace tabs with the equivalent number of spaces. " Also have an autocmd for Makefiles since they require hard tabs. " Python: yes -" C: no +" C: yes " Makefile: no -au BufRead,BufNewFile *.py,*.pyw set expandtab -au BufRead,BufNewFile *.c,*.h set noexpandtab +au BufRead,BufNewFile *.py,*.pyw,*.c,*.h set expandtab au BufRead,BufNewFile Makefile* set noexpandtab " Use the below highlight group when displaying bad whitespace is desired highlight BadWhitespace ctermbg=red guibg=red " Display tabs at the beginning of a line in Python mode as bad +" Should be done for C code, but not until all code has been moved to 4-space +" indents. au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/ " Wrap text after a certain number of characters |