diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-06 15:05:55 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-06 15:05:55 +1200 |
commit | f2ca1ace61553314460d4a094280c2e70db4f9b7 (patch) | |
tree | 2b6ed9a42fb3145953fef62867db787c53b2b32b /vim/after/ftplugin/gitcommit.vim | |
parent | Factor out plugin availability checks to function (diff) | |
download | dotfiles-f2ca1ace61553314460d4a094280c2e70db4f9b7.tar.gz dotfiles-f2ca1ace61553314460d4a094280c2e70db4f9b7.zip |
Remove overzealous checks from gitcommit ftplugin
Diffstat (limited to 'vim/after/ftplugin/gitcommit.vim')
-rw-r--r-- | vim/after/ftplugin/gitcommit.vim | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim index bac342f0..4a1c3814 100644 --- a/vim/after/ftplugin/gitcommit.vim +++ b/vim/after/ftplugin/gitcommit.vim @@ -4,15 +4,13 @@ setlocal formatoptions+=coqr let b:undo_ftplugin .= '|setlocal comments< formatoptions<' " Choose the color column depending on non-comment line count -if has('autocmd') && exists('+cursorcolumn') - augroup gitcommit_cursorcolumn - autocmd CursorMoved,CursorMovedI <buffer> - \ let &l:colorcolumn = gitcommit#CursorColumn() - augroup END - let b:undo_ftplugin .= '|execute ''autocmd! gitcommit_cursorcolumn''' - \ . '|augroup! gitcommit_cursorcolumn' - \ . '|setlocal colorcolumn<' -endif +augroup gitcommit_cursorcolumn + autocmd CursorMoved,CursorMovedI <buffer> + \ let &l:colorcolumn = gitcommit#CursorColumn() +augroup END +let b:undo_ftplugin .= '|execute ''autocmd! gitcommit_cursorcolumn''' + \ . '|augroup! gitcommit_cursorcolumn' + \ . '|setlocal colorcolumn<' " Stop here if the user doesn't want ftplugin mappings if exists('no_plugin_maps') || exists('no_gitcommit_maps') |