summaryrefslogtreecommitdiffstats
path: root/ftplugin/gitcommit.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2016-05-02 10:42:37 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2016-05-02 10:42:37 +0200
commit5dd1a7e83966c92d220073185f1738dfe441f59e (patch)
tree9c4bee389a51a9bb111dcc894c9db0f6d1809d81 /ftplugin/gitcommit.vim
parentbc098370c1bb81840734f5764f431dee270e75ce (diff)
downloadvim-polyglot-5dd1a7e83966c92d220073185f1738dfe441f59e.tar.gz
vim-polyglot-5dd1a7e83966c92d220073185f1738dfe441f59e.zip
Update
Diffstat (limited to '')
-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