From d5efa59a2aab4d07e6ad16b510bee3077db64bf4 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 5 Jun 2019 20:39:33 +0200 Subject: ftplugin/gitcommit.vim: Turn on 'formatoptions' `n` This formats numbered lists so that they wrap to the beginning of the text, instead of being flush with the number. Before: 1. A list that goes beyond the text width and wraps to the number. After: 1. A list that goes beyond the text width and wraps to the text. Thanks to this blog post from Edward Yang for prompting me to read the |fo-table| help again more closely: http://blog.ezyang.com/2010/03/vim-textwidth/ --- ftplugin/gitcommit.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ftplugin') diff --git a/ftplugin/gitcommit.vim b/ftplugin/gitcommit.vim index 05cf30e..44a2e3f 100644 --- a/ftplugin/gitcommit.vim +++ b/ftplugin/gitcommit.vim @@ -15,3 +15,7 @@ setlocal spell " Make bulleted lists with '*' not start wrapped lines with '*' setlocal comments-=mb:* comments+=fb:* + + +" Proper line wrapping for numbered lists +setlocal formatoptions+=n -- cgit v1.2.3