aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-14 19:44:06 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-14 19:44:06 +1200
commitc786a0b813a46329899fbab1782a5f856f3ec79e (patch)
tree0974db79ffff37d2583dc903836b68960b8d137b
parent8c9d2f3dfe79fadd24db3cf01233889530efe4f5 (diff)
downloaddotfiles-c786a0b813a46329899fbab1782a5f856f3ec79e.tar.gz
Rearrange local mappings for mail
-rw-r--r--vim/after/ftplugin/mail.vim36
1 files changed, 21 insertions, 15 deletions
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 0b762e61..c3353cc7 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -34,27 +34,33 @@ if exists('g:no_plugin_maps') || exists('g:no_mail_maps')
finish
endif
-" The quote mapping in the stock plugin is a good idea, but I prefer it to
-" work as a motion rather than quoting to the end of the buffer
-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()
+" Flag a message as unimportant
+nnoremap <buffer> <LocalLeader>l
+ \ <C-U>:call mail#FlagUnimportant()<CR>
+let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>l'
+
+" 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'
-" Flag a message as unimportant
-nnoremap <buffer>
- \ <LocalLeader>l
- \ <C-U>:call mail#FlagUnimportant()<CR>
-let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>l'
-
" Maps using NewBlank() function above for quoted paragraph movement
nnoremap <buffer> <silent> <LocalLeader>[
\ :<C-U>call mail#NewBlank(v:count1, 1, 0)<CR>