aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin/gitcommit.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-14 20:06:53 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-14 20:06:53 +1200
commitaec486fb68204b1842103401093314ea4accc003 (patch)
treed09ac060b31bf929da7af10aa9f6d69e5179037d /vim/after/ftplugin/gitcommit.vim
parentc786a0b813a46329899fbab1782a5f856f3ec79e (diff)
downloaddotfiles-aec486fb68204b1842103401093314ea4accc003.tar.gz
dotfiles-aec486fb68204b1842103401093314ea4accc003.zip
Use consistent format for local leader mappings
Diffstat (limited to 'vim/after/ftplugin/gitcommit.vim')
-rw-r--r--vim/after/ftplugin/gitcommit.vim24
1 files changed, 16 insertions, 8 deletions
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim
index 5699188d..c9b14b6b 100644
--- a/vim/after/ftplugin/gitcommit.vim
+++ b/vim/after/ftplugin/gitcommit.vim
@@ -23,16 +23,24 @@ 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()
-nnoremap <buffer> <expr> <LocalLeader>Q quote#QuoteReformat()
-nnoremap <buffer> <expr> <LocalLeader>QQ quote#QuoteReformat().'_'
-xnoremap <buffer> <expr> <LocalLeader>Q quote#QuoteReformat()
+" 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'
\ . '|nunmap <buffer> <LocalLeader>qq'
\ . '|xunmap <buffer> <LocalLeader>q'
- \ . '|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'
\ . '|nunmap <buffer> <LocalLeader>QQ'
\ . '|xunmap <buffer> <LocalLeader>Q'