]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - contrib/vimrc
Remove an invalid defintion [PR101568].
[thirdparty/gcc.git] / contrib / vimrc
index fa0208d5beb770c6ffa65e33e8b24e6ca67a4152..b7a8ab7360c377e380948d22a3b313be51b5a083 100644 (file)
@@ -39,9 +39,13 @@ function! SetStyle()
     setlocal shiftwidth=2
     setlocal noexpandtab
   endif
-  setlocal textwidth=80
+  if &filetype == "gitcommit"
+    setlocal textwidth=72
+  else
+    setlocal textwidth=79
+  endif
   setlocal formatoptions-=ro formatoptions+=cqlt
-  if index(l:c_exts, l:ext) != -1
+  if index(l:c_exts, l:ext) != -1 || &filetype == "c" || &filetype == "cpp"
     setlocal cindent
     setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,f0,h2,p4,t0,+2,(0,u0,w1,m0
   endif