Do not modify tab options in vimrc for .py files.

	* vimrc: We do not want to modify tab options
	for Python files.
parent dd75498d
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> 2020-04-16 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/92008 PR bootstrap/92008
......
...@@ -28,17 +28,19 @@ ...@@ -28,17 +28,19 @@
function! SetStyle() function! SetStyle()
let l:fname = expand("%:p") 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 if stridx(l:fname, 'libsanitizer') != -1
return return
endif endif
setlocal tabstop=8 if l:ext != "py"
setlocal softtabstop=2 setlocal tabstop=8
setlocal shiftwidth=2 setlocal softtabstop=2
setlocal noexpandtab setlocal shiftwidth=2
setlocal noexpandtab
endif
setlocal textwidth=80 setlocal textwidth=80
setlocal formatoptions-=ro formatoptions+=cqlt 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 if index(l:c_exts, l:ext) != -1
setlocal cindent setlocal cindent
setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,f0,h2,p4,t0,+2,(0,u0,w1,m0 setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,f0,h2,p4,t0,+2,(0,u0,w1,m0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment