From bcea0d1ffda80dfe6004839e8b6e3362d6085a1a Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 6 Jul 2016 21:24:33 +0100 Subject: [PATCH] Improve gitcommit ftplugin settings --- after/ftplugin/gitcommit.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/after/ftplugin/gitcommit.vim b/after/ftplugin/gitcommit.vim index b551a3c..6dae906 100644 --- a/after/ftplugin/gitcommit.vim +++ b/after/ftplugin/gitcommit.vim @@ -1,3 +1,15 @@ if !has("win32") || has("gui_running") + " Enable spell check when available setlocal spell endif + +" Set up format options +" t - Auto-wrap text using textwidth +" n - When formatting text, recognize numbered lists +" q - Allow formatting of comments with 'gq' +" o - Automatically insert the current comment leader after hitting 'o' or +" 'O' in Normal mode +set formatoptions+=tnqo + +" A pattern that is used to recognize a list header +set formatlistpat="^\s*\d\+\.\s\+\|^[-*+]\s\+"