diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-05-13 14:58:26 +0200 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:03:13 -0300 |
commit | f84bff3dea7a856bae895025a30b38ff4e55e875 (patch) | |
tree | 58c0992d6f7a48eed5fd9ee4613f8c67edaa1a45 | |
parent | 694be8158ae00b2b73e0ee0cc6f4ccd453826855 (diff) | |
download | gcc-f84bff3dea7a856bae895025a30b38ff4e55e875.zip gcc-f84bff3dea7a856bae895025a30b38ff4e55e875.tar.gz gcc-f84bff3dea7a856bae895025a30b38ff4e55e875.tar.bz2 |
contrib/vimrc: Reduce textwidth for commit messages
* vimrc: Reduce textwidth to 72 for Git commit messages.
-rw-r--r-- | contrib/ChangeLog | 4 | ||||
-rw-r--r-- | contrib/vimrc | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index f07b049..352f650 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -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 diff --git a/contrib/vimrc b/contrib/vimrc index fa0208d..c207eea 100644 --- a/contrib/vimrc +++ b/contrib/vimrc @@ -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 |