diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2019-09-02 15:30:02 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2019-09-02 15:30:02 +0300 |
commit | 2b196fb76e1ff1ea15c3772ad59ee59018682eff (patch) | |
tree | 75cec150ada97cb8107e99d7a98bde43ebffede2 /contrib/vimrc | |
parent | d2faf10f9578b16d8c262d5d8d307f5bfe3ee2bf (diff) | |
download | gcc-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/vimrc | 12 |
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 |