Do not modify tab options in vimrc for .py files.
* vimrc: We do not want to modify tab options for Python files.
This commit is contained in:
parent
dd75498db7
commit
5315e1dafa
2 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2020-04-17 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* vimrc: We do not want to modify tab options
|
||||
for Python files.
|
||||
|
||||
2020-04-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR bootstrap/92008
|
||||
|
|
|
@ -28,17 +28,19 @@
|
|||
|
||||
function! SetStyle()
|
||||
let l:fname = expand("%:p")
|
||||
let l:ext = fnamemodify(l:fname, ":e")
|
||||
let l:c_exts = ['c', 'h', 'cpp', 'cc', 'C', 'H', 'def', 'java']
|
||||
if stridx(l:fname, 'libsanitizer') != -1
|
||||
return
|
||||
endif
|
||||
setlocal tabstop=8
|
||||
setlocal softtabstop=2
|
||||
setlocal shiftwidth=2
|
||||
setlocal noexpandtab
|
||||
if l:ext != "py"
|
||||
setlocal tabstop=8
|
||||
setlocal softtabstop=2
|
||||
setlocal shiftwidth=2
|
||||
setlocal noexpandtab
|
||||
endif
|
||||
setlocal textwidth=80
|
||||
setlocal formatoptions-=ro formatoptions+=cqlt
|
||||
let l:ext = fnamemodify(l:fname, ":e")
|
||||
let l:c_exts = ['c', 'h', 'cpp', 'cc', 'C', 'H', 'def', 'java']
|
||||
if index(l:c_exts, l:ext) != -1
|
||||
setlocal cindent
|
||||
setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,f0,h2,p4,t0,+2,(0,u0,w1,m0
|
||||
|
|
Loading…
Add table
Reference in a new issue