" Make angle brackets behave like mail quotes setlocal comments+=n:> 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 \ let &l:colorcolumn = gitcommit#CursorColumn() augroup END let b:undo_ftplugin .= '|execute ''autocmd! gitcommit_cursorcolumn''' \ . '|augroup! gitcommit_cursorcolumn' \ . '|setlocal colorcolumn<' endif " Stop here if the user doesn't want ftplugin mappings if exists('no_plugin_maps') || exists('no_gitcommit_maps') finish endif " Quote operator nnoremap q \ quote#Quote() xnoremap q \ quote#Quote() let b:undo_ftplugin .= '|nunmap q' \ . '|xunmap q' " Quote operator with reformatting nnoremap Q \ quote#QuoteReformat() xnoremap Q \ quote#QuoteReformat() let b:undo_ftplugin .= '|nunmap Q' \ . '|xunmap Q'