summaryrefslogtreecommitdiffstats
path: root/ftplugin/gitcommit.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/gitcommit.vim')
-rw-r--r--ftplugin/gitcommit.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/ftplugin/gitcommit.vim b/ftplugin/gitcommit.vim
index 82602a12..dc6a581a 100644
--- a/ftplugin/gitcommit.vim
+++ b/ftplugin/gitcommit.vim
@@ -13,8 +13,10 @@ endif
runtime! ftplugin/git.vim
let b:did_ftplugin = 1
-setlocal nomodeline tabstop=8 formatoptions-=croq formatoptions+=tl textwidth=72
-let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw<'
+setlocal comments=:# commentstring=#\ %s
+setlocal nomodeline tabstop=8 formatoptions+=tl textwidth=72
+setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q
+let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms<'
if exists("g:no_gitcommit_commands") || v:version < 700
finish
@@ -26,6 +28,8 @@ endif
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
+let b:undo_ftplugin = b:undo_ftplugin . "|delc DiffGitCached"
+
function! s:diffcomplete(A,L,P)
let args = ""
if a:P <= match(a:L." -- "," -- ")+3