Search code examples
vimkeymapping

Vimwiki override default vim command <c-i> for "jump forward in jump list", how to re-map it to other key?


After installed Vimwiki, i found the default ctrl+i is now mapped to command: VimwikiNextLink. And I have no way to jump forward in jump list anymore. Before this I can use ctrl+o to jump back, ctrl+i to jump forward in history.

Since so many people are using Vimwiki, does anyone had same issure? Is there a way to re-map the vim jump forward/backward function to e.g. F7/F8 key?

(I tried to find the vim command name for ctrl+i then I can re-map it, the command name I thought could be e.g. ":jumpForward", but it turns out it doesn't look like there is a command name for it.)


Solution

  • This is all covered by the fine documentation, and works the same for almost all plugins: Override the mapping before the plugin is sourced, e.g. in your ~/.vimrc:

    nmap <Leader>wn <Plug>VimwikiNextLink
    

    PS: <C-i> is the same as <Tab>.