aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin/gitcommit.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/ftplugin/gitcommit.vim')
-rw-r--r--vim/after/ftplugin/gitcommit.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim
index 8e365d98..4f57a407 100644
--- a/vim/after/ftplugin/gitcommit.vim
+++ b/vim/after/ftplugin/gitcommit.vim
@@ -7,3 +7,16 @@ endif
setlocal comments+=n:>
setlocal formatoptions+=coqr
let b:undo_ftplugin .= '|setlocal comments< formatoptions<'
+
+" Stop here if the user doesn't want ftplugin mappings
+if exists('g:no_plugin_maps') || exists('g:no_gitcommit_maps')
+ finish
+endif
+
+" Mail quote mappings
+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 <LocalLeader>q'
+ \ . '|nunmap <LocalLeader>qq'
+ \ . '|xunmap <LocalLeader>q'