X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=vim%2Fplugin%2Fnotmuch.vim;h=15958f18c02c407d93056717aa858b825c4cfc47;hp=e41daed162a6981759b1b1425fcff9b14a6bc78d;hb=480903adac81ec03613c4edf46c9c2f6a2766c4c;hpb=7a7be482f79b13130fa2b053df9fdea6b86d4c95;ds=sidebyside diff --git a/vim/plugin/notmuch.vim b/vim/plugin/notmuch.vim index e41daed1..15958f18 100644 --- a/vim/plugin/notmuch.vim +++ b/vim/plugin/notmuch.vim @@ -161,7 +161,7 @@ function! s:NM_cmd_folders(words) let b:nm_timestamp = reltime() call NM_cmd_folders_mksyntax() - call NM_set_map(g:notmuch_folders_maps) + call NM_set_map('n', g:notmuch_folders_maps) setlocal cursorline setlocal nowrap endfunction @@ -209,7 +209,7 @@ function! s:NM_cmd_search(words) let b:nm_search_words = a:words call NM_cmd_search_mksyntax() - call NM_set_map(g:notmuch_search_maps) + call NM_set_map('n', g:notmuch_search_maps) setlocal cursorline setlocal nowrap endfunction @@ -395,7 +395,7 @@ function! s:NM_cmd_show(words) call NM_cmd_show_mkfolds() call NM_cmd_show_mksyntax() - call NM_set_map(g:notmuch_show_maps) + call NM_set_map('n', g:notmuch_show_maps) setlocal foldtext=NM_cmd_show_foldtext() setlocal fillchars= setlocal foldcolumn=6 @@ -979,10 +979,10 @@ endif " --- assign keymaps {{{1 -function! s:NM_set_map(maps) +function! s:NM_set_map(type, maps) nmapclear for [key, code] in items(a:maps) - exec printf('nnoremap %s %s', key, code) + exec printf('%snoremap %s %s', a:type, key, code) endfor " --- this is a hack for development :) nnoremap ,nmr :source ~/.vim/plugin/notmuch.vim:call NotMuch('')