mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 21:37:55 +08:00
update vim readme with new mappings and options
This commit is contained in:
@@ -70,7 +70,11 @@ function! himalaya#mbox#pick(cb)
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function! himalaya#mbox#set(mbox)
|
||||
function! himalaya#mbox#change()
|
||||
call himalaya#mbox#pick("himalaya#mbox#_change")
|
||||
endfunction
|
||||
|
||||
function! himalaya#mbox#_change(mbox)
|
||||
let s:curr_mbox = a:mbox
|
||||
let s:curr_page = 0
|
||||
call himalaya#msg#list()
|
||||
|
||||
@@ -147,7 +147,11 @@ function! himalaya#msg#forward()
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function! himalaya#msg#copy(target_mbox)
|
||||
function! himalaya#msg#copy()
|
||||
call himalaya#mbox#pick("himalaya#msg#_copy")
|
||||
endfunction
|
||||
|
||||
function! himalaya#msg#_copy(target_mbox)
|
||||
try
|
||||
let pos = getpos(".")
|
||||
let msg_id = stridx(bufname("%"), "Himalaya messages") == 0 ? s:get_focused_msg_id() : s:msg_id
|
||||
@@ -162,7 +166,11 @@ function! himalaya#msg#copy(target_mbox)
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function! himalaya#msg#move(target_mbox)
|
||||
function! himalaya#msg#move()
|
||||
call himalaya#mbox#pick("himalaya#msg#_move")
|
||||
endfunction
|
||||
|
||||
function! himalaya#msg#_move(target_mbox)
|
||||
try
|
||||
let msg_id = stridx(bufname("%"), "Himalaya messages") == 0 ? s:get_focused_msg_id() : s:msg_id
|
||||
let choice = input(printf("Are you sure you want to move the message %d? (y/N) ", msg_id))
|
||||
|
||||
@@ -2,7 +2,7 @@ function! himalaya#shared#bindings#define(bindings)
|
||||
for [mode, key, name] in a:bindings
|
||||
let plug = substitute(name, "[#_]", "-", "g")
|
||||
let plug = printf("<plug>(himalaya-%s)", plug)
|
||||
execute printf("%snoremap <silent>%s :call himalaya#%s<cr>", mode, plug, name)
|
||||
execute printf("%snoremap <silent>%s :call himalaya#%s()<cr>", mode, plug, name)
|
||||
|
||||
if !hasmapto(plug, mode)
|
||||
execute printf("%smap <nowait><buffer>%s %s", mode, key, plug)
|
||||
|
||||
Reference in New Issue
Block a user