I am a newbie and recently learned to use the vimwkiki plug-in, but some shortcut keys in it cannot be used.
3. Mappings |vimwiki-mappings|
3.1. Global mappings |vimwiki-global-mappings|
3.2. Local mappings |vimwiki-local-mappings|
-------------------------------------------------- -----------------------
<Leader>wh Convert current wiki page to HTML.
Maps to |:Vimwiki2HTML|
To remap: >
:nmap <Leader>wc <Plug>Vimwiki2HTML
-------------------------------------------------- -----------------------
According to the vimwiki help document, the problem lies in the local mappings described in Section 3.2.
Baidu searched for two key words, both of which were repeated content; Google searched for them, but I couldn’t understand them. T.T
Do I need to set the value of localmapleader in vimrc to use the shortcut keys of vimwiki-local-mappings?
The vimwiki version I use is Version: 2.0.1 'stu'
Explanation quoted from vim Chinese documentation (http://vimcdoc.sourceforge.net):
The problem I encountered that Vimwiki2HTML shortcut keys cannot be used is that <buffer> is "causing trouble".
After installing the vimwiki plug-in with pathogen, there is a vimwiki.vim file under ~/.vim/bundle/vimwiki/ftplugin. There is a shortcut key definition for converting wiki to HTML as follows:
<buffer> limits the scope of this shortcut key, then this shortcut key will only be effective for files with the suffix name vimwiki, and will not work for files in other formats.
I was not familiar with ftplugin before, nor was I familiar with the scope of shortcut keys, so I didn’t call up this shortcut key. Thank you to netizen @xuelang for your enthusiastic help.
Finally, I would like to add that both mapleader and localmapleader are customizable.
If you also encounter the problem that some shortcut keys in vimwiki cannot be used, you can still use it
Hope this answer will be helpful to netizens who encounter the same problem. :)
You don’t need to set the value of localmapleader in vimrc to use the shortcut keys of vimwiki-local-mappings.
For example:
Command: The default shortcut key bound to Vimwiki2HTML in vimwiki is <leader>wh. That is to say, after opening the vimviki file, quickly press the wh keys in normal mode to generate the corresponding html file. Of course, you can also Redefine the shortcut keys yourself, as follows:
Just add the above key matching in .vimrc.
-------------------------------------------------- ------------
<leader> is generally a key. You can modify the key value represented by <leader>. You can check the help: