]> gcc.gnu.org Git - gcc.git/commitdiff
contrib/vimrc: Reduce textwidth for commit messages
authorPatrick Palka <ppalka@redhat.com>
Wed, 13 May 2020 12:58:26 +0000 (14:58 +0200)
committerMartin Liska <mliska@suse.cz>
Wed, 13 May 2020 12:58:50 +0000 (14:58 +0200)
* vimrc: Reduce textwidth to 72 for Git commit messages.

contrib/ChangeLog
contrib/vimrc

index f07b049535b34e09a00f7df5a62a78357ba579bc..352f650ff4123d86c39aec29d3df8ddbbb84cdbe 100644 (file)
@@ -1,3 +1,7 @@
+2020-05-13  Patrick Palka  <ppalka@redhat.com>
+
+       * vimrc: Reduce textwidth to 72 for Git commit messages.
+
 2020-05-13  Martin Liska  <mliska@suse.cz>
 
        * gcc-changelog/git_check_commit.py: Add default argument HEAD
index fa0208d5beb770c6ffa65e33e8b24e6ca67a4152..c207eead2e4531f8ce403a51b4b9e3cfbb3d4db8 100644 (file)
@@ -39,7 +39,11 @@ function! SetStyle()
     setlocal shiftwidth=2
     setlocal noexpandtab
   endif
-  setlocal textwidth=80
+  if &filetype == "gitcommit"
+    setlocal textwidth=72
+  else
+    setlocal textwidth=80
+  endif
   setlocal formatoptions-=ro formatoptions+=cqlt
   if index(l:c_exts, l:ext) != -1
     setlocal cindent
This page took 0.065216 seconds and 5 git commands to generate.