aboutsummaryrefslogtreecommitdiff
path: root/contrib/vimrc
diff options
context:
space:
mode:
authorAlexander Monakov <amonakov@ispras.ru>2019-09-02 15:30:02 +0300
committerAlexander Monakov <amonakov@gcc.gnu.org>2019-09-02 15:30:02 +0300
commit2b196fb76e1ff1ea15c3772ad59ee59018682eff (patch)
tree75cec150ada97cb8107e99d7a98bde43ebffede2 /contrib/vimrc
parentd2faf10f9578b16d8c262d5d8d307f5bfe3ee2bf (diff)
downloadgcc-2b196fb76e1ff1ea15c3772ad59ee59018682eff.zip
gcc-2b196fb76e1ff1ea15c3772ad59ee59018682eff.tar.gz
gcc-2b196fb76e1ff1ea15c3772ad59ee59018682eff.tar.bz2
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
Diffstat (limited to 'contrib/vimrc')
-rw-r--r--contrib/vimrc12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/vimrc b/contrib/vimrc
index 7c0c587..bbbe1dd 100644
--- a/contrib/vimrc
+++ b/contrib/vimrc
@@ -31,17 +31,17 @@ function! SetStyle()
if stridx(l:fname, 'libsanitizer') != -1
return
endif
+ setlocal tabstop=8
+ setlocal softtabstop=2
+ setlocal shiftwidth=2
+ setlocal noexpandtab
+ 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 tabstop=8
- setlocal softtabstop=2
- setlocal shiftwidth=2
- 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 formatoptions-=ro formatoptions+=cqlt
endif
endfunction