[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")
|
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 Filetype python set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
|
||||||
autocmd BufRead,BufNewFile *.py set ai
|
autocmd Filetype python set tabstop=8
|
||||||
autocmd BufRead,BufNewFile *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
|
autocmd Filetype python set expandtab
|
||||||
autocmd BufRead,BufNewFile *.py set tabstop=4
|
autocmd Filetype python set shiftwidth=4
|
||||||
autocmd BufRead,BufNewFile *.py set expandtab
|
autocmd Filetype python set softtabstop=4
|
||||||
autocmd BufRead,BufNewFile *.py set shiftwidth=4
|
autocmd Filetype python set modeline
|
||||||
autocmd BufRead,BufNewFile *.py set softtabstop=4
|
|
||||||
autocmd BufRead,BufNewFile *.py set modeline
|
|
||||||
autocmd BufRead,BufNewFile *.py set ft=python
|
|
||||||
" Indentation with = for python need autopep8
|
" Indentation with = for python need autopep8
|
||||||
autocmd BufRead,BufNewFile *.py set equalprg=autopep8\ -
|
autocmd Filetype python set equalprg=autopep8\ -
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
|
Loading…
Reference in New Issue
Block a user