add python config to vimrc

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

13
vimrc
View File

@ -50,7 +50,7 @@ set backspace=indent,eol,start
" don't use Ex mode, use Q for formatting " don't use Ex mode, use Q for formatting
map Q gq map Q gq
" disable mouse " disable mouse
set mouse= set mouse=a
" key combination timeout " key combination timeout
set notimeout set notimeout
"set timeoutlen=4000 "set timeoutlen=4000
@ -160,6 +160,8 @@ set ruler
set showmode set showmode
" display incomplete commands " display incomplete commands
set showcmd set showcmd
" display line number"
set number
""""""""""""""" """""""""""""""
" INDENTATION " " INDENTATION "
@ -188,6 +190,15 @@ set smarttab
if has("autocmd") if has("autocmd")
" python " 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 endif
" define whitespaces at end of line as bad whitespaces " define whitespaces at end of line as bad whitespaces
match BadWhitespace /\s\+$/ match BadWhitespace /\s\+$/