Python使用vim环境配置

1.语法高亮(~/.vim/syntax/python.vim)

http://www.vim.org/scripts/script.php?script_id=790

2.代码折叠

http://www.vim.org/scripts/script.php?script_id=515

3.~/.vimrc

" 自动检测文件类型并加载相应的设置
filetype plugin indent on

Python文件中建议不出现Tab,而用空格代替,另外缩进量应为四个空格。故可再加入:

autocmd FileType python setlocal et sta sw=4 sts=4

 

posted @ 2011-09-17 11:15  cython  阅读(404)  评论(0)    收藏  举报