aboutsummaryrefslogtreecommitdiff
path: root/vim/config
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-11 01:05:15 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-11 01:05:15 +1300
commitf9600abb2182b467dfd24ce16e3eebed26723338 (patch)
tree4804a2e6ed86f1e3a33e1ab3b8a3ea11be44fb7f /vim/config
parentAdd new mail_mutt.vim plugin, apply mappings (diff)
downloaddotfiles-f9600abb2182b467dfd24ce16e3eebed26723338.tar.gz
dotfiles-f9600abb2182b467dfd24ce16e3eebed26723338.zip
Move mutt_mail.vim line select logic into plugin
This makes the configuration shorter and easier to read.
Diffstat (limited to 'vim/config')
-rw-r--r--vim/config/command.vim14
1 files changed, 4 insertions, 10 deletions
diff --git a/vim/config/command.vim b/vim/config/command.vim
index 705f29b0..e3f7c473 100644
--- a/vim/config/command.vim
+++ b/vim/config/command.vim
@@ -35,15 +35,9 @@ nnoremap <silent>
\ <Leader>D
\ :<C-U>read !date -u<CR>
+" \m in visual/select mode starts a mail message with the selected lines
+vmap <Leader>m <Plug>MailMuttSelected
" \m in normal mode starts a mail message with the current line
-nmap <silent>
- \ <Leader>m
- \ :<C-U>.MailMutt<CR>
+nmap <Leader>m <Plug>MailMuttLine
" \M in normal mode starts a mail message with the whole buffer
-nmap <silent>
- \ <Leader>M
- \ :<C-U>%MailMutt<CR>
-" \m in visual mode starts a mail message with the selected lines
-vmap <silent>
- \ <Leader>m
- \ :MailMutt<CR>
+nmap <Leader>M <Plug>MailMuttBuffer