Vim: remove the mapping created by vim-plugin

I use Vimwiki-Plugin a lot, but reassigning <Backspace> and <CR> simply not obvious. If I use :nmap , the mapping is displayed:

 n <CR> @<Plug>VimwikiFollowLink n <Backspace> @<Plug>VimwikiGoBackLink 

If I try to remove a mapping using :nunmap <CR> , I get the error "E31: No such mapping". Is there a way to return <CR> and <Backspace> its normal behavior?

+7
source share
1 answer

if you want to just turn it off, you can give

 :nunmap <buffer> <CR> 

since this is a local buffer mapping.

or

 :h vimwiki_<cr> 

you have found:

 <CR> Follow/create wiki link (create target wiki page if needed). Maps to |:VimwikiFollowLink|. To remap: > :nmap <Leader>wf <Plug>VimwikiFollowLink 

if you reassign it to another key, for example. the keys in the example <leader>wf , <cr> will reset to normal.

because in its code vmwiki has:

 if !hasmapto('<Plug>VimwikiFollowLink') nmap <silent><buffer> <CR> <Plug>VimwikiFollowLink endif 

same for <BS>

+15
source

All Articles