[vim]use filetype for python autocmd
This commit is contained in:
parent
ca1ea2e785
commit
385edc5dad
18
.vimrc
18
.vimrc
@ -129,17 +129,15 @@ set shiftwidth=8
|
||||
if has("autocmd")
|
||||
" python
|
||||
" 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
|
||||
autocmd BufRead,BufNewFile *.py set tabstop=4
|
||||
autocmd BufRead,BufNewFile *.py set expandtab
|
||||
autocmd BufRead,BufNewFile *.py set shiftwidth=4
|
||||
autocmd BufRead,BufNewFile *.py set softtabstop=4
|
||||
autocmd BufRead,BufNewFile *.py set modeline
|
||||
autocmd BufRead,BufNewFile *.py set ft=python
|
||||
autocmd Filetype python set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
|
||||
autocmd Filetype python set tabstop=8
|
||||
autocmd Filetype python set expandtab
|
||||
autocmd Filetype python set shiftwidth=4
|
||||
autocmd Filetype python set softtabstop=4
|
||||
autocmd Filetype python set modeline
|
||||
" Indentation with = for python need autopep8
|
||||
autocmd BufRead,BufNewFile *.py set equalprg=autopep8\ -
|
||||
autocmd Filetype python set equalprg=autopep8\ -
|
||||
|
||||
endif
|
||||
|
||||
if has("autocmd")
|
||||
|
Loading…
Reference in New Issue
Block a user