contrib/vimrc: Reduce textwidth for commit messages

* vimrc: Reduce textwidth to 72 for Git commit messages.
This commit is contained in:
Patrick Palka 2020-05-13 14:58:26 +02:00 committed by Martin Liska
parent e4f0e06b2f
commit 9b56828c57
No known key found for this signature in database
GPG Key ID: 4DC182DC0FA73785
2 changed files with 9 additions and 1 deletions

View 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

View 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