Insert spaces instead of tabs
set expandtab
orset et
Set the width of shifts to 4 for autoindenting and shifting: >> and <<
set shiftwidth=4
orset sw=4
Set where to stop tabs to 4
set tabstop=4
orset ts=4
This is what I have in my
~/.vimrc
:Set expanded tabs with shiftwidth=4 and tabstop=4 for Java, Perl, C, and C++ files
autocmd BufNewFile,BufRead *.java,*.pl,*.c,*.h,*.cc,*.cpp,*.hpp set sw=4 ts=4 et
No comments:
Post a Comment