add python config to vimrc

This commit is contained in:
Mathieu Maret 2009-09-07 11:27:41 +02:00
parent 1fd358df93
commit 4761123080

15
vimrc
View File

@ -50,7 +50,7 @@ set backspace=indent,eol,start
" don't use Ex mode, use Q for formatting
map Q gq
" disable mouse
set mouse=
set mouse=a
" key combination timeout
set notimeout
"set timeoutlen=4000
@ -160,6 +160,8 @@ set ruler
set showmode
" display incomplete commands
set showcmd
" display line number"
set number
"""""""""""""""
" INDENTATION "
@ -187,7 +189,16 @@ set noexpandtab
set smarttab
if has("autocmd")
" python
"autocmd FileType python set tabstop=4|set shiftwidth=4|set expandtab
" autocmd FileType python set tabstop=4|set shiftwidth=4|set expandtab
autocmd BufRead,BufNewFile *.py syntax on
autocmd BufRead,BufNewFile *.py set ai
autocmd BufRead,BufNewFile *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
set tabstop=4
set expandtab
set shiftwidth=4
set softtabstop=4
set modeline
endif
" define whitespaces at end of line as bad whitespaces
match BadWhitespace /\s\+$/