diff options
Diffstat (limited to 'vim/after/ftplugin/gitcommit.vim')
-rw-r--r-- | vim/after/ftplugin/gitcommit.vim | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim index 2dc5fa37..1a4c1b1b 100644 --- a/vim/after/ftplugin/gitcommit.vim +++ b/vim/after/ftplugin/gitcommit.vim @@ -1,8 +1,3 @@ -" Extra configuration for Git commit messages -if &filetype !=# 'gitcommit' || v:version < 700 - finish -endif - " Make angle brackets behave like mail quotes setlocal comments+=n:> setlocal formatoptions+=coqr @@ -14,8 +9,9 @@ if has('autocmd') && exists('+cursorcolumn') autocmd CursorMoved,CursorMovedI <buffer> \ let &l:colorcolumn = gitcommit#CursorColumn() augroup END - let b:undo_ftplugin .= '|autocmd! gitcommit' + let b:undo_ftplugin .= '|execute ''autocmd! gitcommit''' \ . '|augroup! gitcommit' + \ . '|setlocal colorcolumn<' endif " Stop here if the user doesn't want ftplugin mappings @@ -26,8 +22,6 @@ endif " Quote operator nnoremap <buffer> <expr> <LocalLeader>q \ quote#Quote() -nnoremap <buffer> <expr> <LocalLeader>qq - \ quote#Quote().'_' xnoremap <buffer> <expr> <LocalLeader>q \ quote#Quote() let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>q' @@ -37,8 +31,6 @@ let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>q' " Quote operator with reformatting nnoremap <buffer> <expr> <LocalLeader>Q \ quote#QuoteReformat() -nnoremap <buffer> <expr> <LocalLeader>QQ - \ quote#QuoteReformat().'_' xnoremap <buffer> <expr> <LocalLeader>Q \ quote#QuoteReformat() let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>Q' |