Tuesday, 17 July 2012

Vim n Python 환경설정


Very likely, your source file contains both tabs and spaces.
It's a good pratice to only use spaces in source file.
You can convert all tabs to spaces by using those command:
:set expandtab:ret!
I suggest put those commands bellow in your .vimrc:
set expandtab softtabstop=4 tabstop=4 shiftwidth=4

_vimrc

autocmd BufRead,BufNewFile *.py syntax on
autocmd BufRead,BufNewFile *.py set ai
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,with,try,except,finally,def,class

No comments:

Post a Comment

가장 많이 본 글