aboutsummaryrefslogtreecommitdiff
path: root/vim/after
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-03 12:30:38 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-03 12:30:38 +1200
commitecb15a1227303ae50da16081c7049d37e01e7f70 (patch)
treec8c54c7361f0b4549910ef3a36d72dfdfafdb1ec /vim/after
parentMerge branch 'release/v1.42.0' into develop (diff)
downloaddotfiles-ecb15a1227303ae50da16081c7049d37e01e7f70.tar.gz
dotfiles-ecb15a1227303ae50da16081c7049d37e01e7f70.zip
Add mapping to flag mail messages as unimportant
Diffstat (limited to 'vim/after')
-rw-r--r--vim/after/ftplugin/mail.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 74261d8c..34c524e1 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -33,3 +33,16 @@ let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>q'
\ . '|nunmap <buffer> <LocalLeader>Q'
\ . '|nunmap <buffer> <LocalLeader>QQ'
\ . '|xunmap <buffer> <LocalLeader>Q'
+
+" Flag a message as unimportant
+function! s:FlagUnimportant()
+ call cursor(1, 1)
+ call search('^$')
+ -
+ call append(line('.'), 'X-Priority: 5')
+ call append(line('.'), 'Importance: Low')
+endfunction
+nnoremap <buffer>
+ \ <LocalLeader>l
+ \ <C-U>:call <SID>FlagUnimportant()<CR>
+let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>l'