VIM settings for Python

Here are a few VIM settings that have been helpful to me for python.

This adds improved syntax highlighting:
http://www.vim.org/scripts/script.php?script_id=790

Add the following to your .vimrc file. This is usually located in your home directory at ~/.vimrc

autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
autocmd BufRead *.py set tabstop=4
autocmd BufRead *.py set shiftwidth=4
autocmd BufRead *.py set smarttab
autocmd BufRead *.py set expandtab
autocmd BufRead *.py set softtabstop=4
autocmd BufRead *.py set autoindent

Category: python, technology | Tags: Comments Off

Comments are closed.

Back to top