]> git.notmuchmail.org Git - notmuch/blobdiff - vim/plugin/notmuch.vim
keep the ,nmr hack around
[notmuch] / vim / plugin / notmuch.vim
index 09df1ed9aea3e5ca8a15d6aba755e1264482a662..abb3cb468b54d75bdb8fa33bcc185cea785b8b2e 100644 (file)
@@ -743,9 +743,12 @@ endif
 " --- assign keymaps {{{1
 
 function! s:NM_set_map(maps)
 " --- assign keymaps {{{1
 
 function! s:NM_set_map(maps)
+        nmapclear
         for [key, code] in items(a:maps)
                 exec printf('nnoremap <buffer> %s %s', key, code)
         endfor
         for [key, code] in items(a:maps)
                 exec printf('nnoremap <buffer> %s %s', key, code)
         endfor
+        " --- this is a hack for development :)
+        nnoremap ,nmr :source ~/.vim/plugin/notmuch.vim<CR>:call NotMuch('')<CR>
 endfunction
 
 " --- command handler {{{1
 endfunction
 
 " --- command handler {{{1
@@ -776,8 +779,4 @@ endfunction
 command! -nargs=* -complete=customlist,CompleteNotMuch NotMuch call NotMuch(<q-args>)
 cabbrev  notmuch <c-r>=(getcmdtype()==':' && getcmdpos()==1 ? 'NotMuch' : 'notmuch')<CR>
 
 command! -nargs=* -complete=customlist,CompleteNotMuch NotMuch call NotMuch(<q-args>)
 cabbrev  notmuch <c-r>=(getcmdtype()==':' && getcmdpos()==1 ? 'NotMuch' : 'notmuch')<CR>
 
-" --- hacks, only for development :) {{{1
-
-nnoremap ,nmr :source ~/.vim/plugin/notmuch.vim<CR>:call NotMuch('')<CR>
-
 " vim: set ft=vim ts=8 sw=8 et foldmethod=marker :
 " vim: set ft=vim ts=8 sw=8 et foldmethod=marker :