contrib/vimrc: override formatting options for more files
* vim-gcc-dev/syntax/gcc-match.vim: Do not override 'tabstop' here. * vimrc: Set preferred values for 'tabstop', 'softtabstop', 'shiftwidth', 'noexpandtab', 'textwidth', 'formatoptions' for all files, not just C-like files. From-SVN: r275316
This commit is contained in:
parent
d2faf10f95
commit
2b196fb76e
|
@ -1,3 +1,10 @@
|
||||||
|
2019-09-02 Alexander Monakov <amonakov@ispras.ru>
|
||||||
|
|
||||||
|
* vim-gcc-dev/syntax/gcc-match.vim: Do not override 'tabstop' here.
|
||||||
|
* vimrc: Set preferred values for 'tabstop', 'softtabstop',
|
||||||
|
'shiftwidth', 'noexpandtab', 'textwidth', 'formatoptions' for all
|
||||||
|
files, not just C-like files.
|
||||||
|
|
||||||
2019-09-02 Martin Liska <mliska@suse.cz>
|
2019-09-02 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
* vim-gcc-dev/syntax/gcc-match.vim: Set tabstop=8.
|
* vim-gcc-dev/syntax/gcc-match.vim: Set tabstop=8.
|
||||||
|
|
|
@ -68,6 +68,4 @@ hi def link pdComment Comment
|
||||||
hi def link pdTodo Todo
|
hi def link pdTodo Todo
|
||||||
hi def link pdPreProc PreProc
|
hi def link pdPreProc PreProc
|
||||||
|
|
||||||
setlocal tabstop=8
|
|
||||||
|
|
||||||
let b:current_syntax = "gcc-match"
|
let b:current_syntax = "gcc-match"
|
||||||
|
|
|
@ -31,17 +31,17 @@ function! SetStyle()
|
||||||
if stridx(l:fname, 'libsanitizer') != -1
|
if stridx(l:fname, 'libsanitizer') != -1
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
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 tabstop=8
|
setlocal tabstop=8
|
||||||
setlocal softtabstop=2
|
setlocal softtabstop=2
|
||||||
setlocal shiftwidth=2
|
setlocal shiftwidth=2
|
||||||
setlocal noexpandtab
|
setlocal noexpandtab
|
||||||
setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,f0,h2,p4,t0,+2,(0,u0,w1,m0
|
|
||||||
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
|
||||||
|
setlocal cindent
|
||||||
|
setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,f0,h2,p4,t0,+2,(0,u0,w1,m0
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue