lib/vmail.vim in vmail-0.2.6 vs lib/vmail.vim in vmail-0.2.7
- old
+ new
@@ -23,10 +23,12 @@
let s:forward_template_command = s:client_script . "forward_template "
let s:deliver_command = s:client_script . "deliver "
let s:save_draft_command = s:client_script . "save_draft "
let s:save_attachments_command = s:client_script . "save_attachments "
let s:open_html_part_command = s:client_script . "open_html_part "
+let s:show_help_command = s:client_script . "show_help"
+
let s:message_bufname = "MessageWindow"
function! VmailStatusLine()
return "%<%f\ " . s:mailbox . " " . s:query . "%r%=%-14.(%l,%c%V%)\ %P"
endfunction
@@ -659,10 +661,21 @@
let command = "!" . s:browser_command . ' ' . shellescape(href)
exec command
endfunc
" --------------------------------------------------------------------------------
+" HELP
+func! s:show_help()
+ let helpfile = system(s:show_help_command)
+ exec "split " . helpfile
+ setlocal nomodifiable
+ setlocal buftype=nofile
+ nnoremap <silent> <buffer> q :close<cr>
+endfunc
+
+
+" --------------------------------------------------------------------------------
" MAPPINGS
func! s:message_window_mappings()
noremap <silent> <buffer> <cr> :call <SID>focus_list_window()<CR>
noremap <silent> <buffer> <Leader>r :call <SID>compose_reply(0)<CR>
@@ -733,9 +746,10 @@
" NOTE send_message is a global mapping, so user can load a saved
" message from a file and send it
nnoremap <silent> <leader>vs :call <SID>send_message()<CR>
nnoremap <silent> <leader>vd :call <SID>save_draft()<CR>
noremap <silent> <leader>o :call <SID>open_href()<cr>
+ noremap <silent> <leader>? :call <SID>show_help()<cr>
endfunc
"TODO see if using LocalLeader and maplocalleader makes more sense
let mapleader = ","