diff options
author | Teddy Wing | 2014-11-06 23:34:52 -0500 |
---|---|---|
committer | Teddy Wing | 2014-11-06 23:34:52 -0500 |
commit | b68edcb9174c1876b3871de5a276dc8d7d9a3e0a (patch) | |
tree | 3c5a2aaa0f036d5fbcbbfbb67ccfbef8166376b4 /ftplugin | |
parent | c451c1496ebb6f313f43bf204a92c3dd9fd05bee (diff) | |
download | dotvim-b68edcb9174c1876b3871de5a276dc8d7d9a3e0a.tar.bz2 |
ftplugin/gitcommit.vim: Don't start wrapped lines with '*'
When making bulleted lists in git commits, I normally use '*' as the
bullet character.
When my text wrapped from the textwidth=72 setting for gitcommit-type
files, the line following the start of a bullet would begin with a
bullet.
Obviously this is the wrong behaviour since I'm continuing a list item,
not of starting a new one.
This frustrated me to no end whenever I wrote a list in a git commit,
constantly having to `0r<space>` to fix the extra asterisks.
I finally decided to solve this problem once and for all. Read up a
little on:
* :h formatoptions
* :h fo-table
* :h format-comments
The last of which gave me what I needed to fix the problem. Now
asterisks in git commits behave as list bullets.
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/gitcommit.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ftplugin/gitcommit.vim b/ftplugin/gitcommit.vim index c12287a..5d995b2 100644 --- a/ftplugin/gitcommit.vim +++ b/ftplugin/gitcommit.vim @@ -8,3 +8,7 @@ setlocal shiftwidth=2 setlocal textwidth=72 + + +" Make bulleted lists with '*' not start wrapped lines with '*' +setlocal comments-=mb:* comments+=fb:* |