From 8c6bc817560a314159378191de7683751260c948 Mon Sep 17 00:00:00 2001 From: Steve Dondley Date: Sat, 11 May 2019 14:55:26 -0400 Subject: [PATCH] Improve documentation on global key mappings (#703) --- doc/vimwiki.txt | 100 +++++++++++++++++++++++++++++++----------------- 1 file changed, 64 insertions(+), 36 deletions(-) diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index d75a276..6f8d6d4 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -110,11 +110,34 @@ There are global and local mappings in Vimwiki. ------------------------------------------------------------------------------ 3.1. Global mappings *vimwiki-global-mappings* -NOTE: if a user mapping or mapping from another plugin uses the same key -sequence as one of the following mappings then Vimwiki will not overwrite it. +Below is a list of all default global key mappings provided by Vimwiki. As +global settings, they work in all vim sessions no matter what filetype you +have open. Vimwiki respects pre-existing global mappings created by you or +other plugins and will not overwrite them. + +If a conflict exists between Vimwiki and pre-existing maps or if you wish to +customize these default mappings, you can remap them with: > + + :nmap {map} {command} + +where + `{map}` is the new key sequence of your choosing + `{command}` is the Vimwiki command you are remapping + +So, for example, to remap the |:VimwikiIndex| mapping, you'd do something +like: > + :nmap wx VimwikiIndex + +Note that the recursive version of "map" command is needed to expand the right +hand side to retrieve the definition. "noremap" will not work. is +required and considered to be part of the command. + +You can also place remappings in your vimrc file, without the leading colon, of +course. -[count]ww or VimwikiIndex + *vimwiki_ww* +[count]ww Open index file of the [count]'s wiki. ww opens the first wiki from |g:vimwiki_list|. @@ -122,13 +145,14 @@ sequence as one of the following mappings then Vimwiki will not overwrite it. 2ww opens the second wiki from |g:vimwiki_list|. 3ww opens the third wiki from |g:vimwiki_list|. etc. - To remap: > - :nmap w VimwikiIndex -< + + Remap command: `VimwikiIndex` + See also |:VimwikiIndex| -[count]wt or VimwikiTabIndex + *vimwiki_wt* +[count]wt Open index file of the [count]'s wiki in a new tab. wt tabopens the first wiki from |g:vimwiki_list|. @@ -136,21 +160,21 @@ See also |:VimwikiIndex| 2wt tabopens the second wiki from |g:vimwiki_list|. 3wt tabopens the third wiki from |g:vimwiki_list|. etc. - To remap: > - :nmap t VimwikiTabIndex -< + + Remap command: `VimwikiTabIndex` + See also |:VimwikiTabIndex| - -ws or VimwikiUISelect + *vimwiki_ws* +ws List and select available wikis. - To remap: > - :nmap wq VimwikiUISelect -< + + Remap command: `VimwikiUISelect` + See also |:VimwikiUISelect| - -[count]wi or VimwikiDiaryIndex + *vimwiki_wi* +[count]wi Open diary index file of the [count]'s wiki. wi opens diary index file of the current wiki. @@ -159,13 +183,13 @@ See also |:VimwikiUISelect| 2wi opens diary index file of the second wiki from |g:vimwiki_list|. etc. - To remap: > - :nmap i VimwikiDiaryIndex + + Remap command: `VimwikiDiaryIndex` See also |:VimwikiDiaryIndex| - -[count]ww or VimwikiMakeDiaryNote + *vimwiki_ww* +[count]ww Open diary wiki-file for today of the [count]'s wiki. ww opens diary wiki-file for today in the current wiki @@ -176,13 +200,14 @@ See also |:VimwikiDiaryIndex| 3ww opens diary wiki-file for today in the third wiki from |g:vimwiki_list|. etc. - To remap: > - :nmap d VimwikiMakeDiaryNote -< + + Remap command: `VimwikiMakeDiaryNote` + See also |:VimwikiMakeDiaryNote| -[count]wt or VimwikiTabMakeDiaryNote + *vimwiki_wt* +[count]wt Open diary wiki-file for today of the [count]'s wiki in a new tab. wt tabopens diary wiki-file for today in the current @@ -194,13 +219,14 @@ See also |:VimwikiMakeDiaryNote| 3wt tabopens diary wiki-file for today in the third wiki from |g:vimwiki_list|. etc. - To remap: > - :nmap dt VimwikiTabMakeDiaryNote -< + + Remap command: `VimwikiTabMakeDiaryNote` + See also |:VimwikiTabMakeDiaryNote| -[count]wy or VimwikiMakeYesterdayDiaryNote + *vimwiki_wy* +[count]wy Open diary wiki-file for yesterday of the [count]'s wiki. wy opens diary wiki-file for yesterday in the current @@ -212,12 +238,13 @@ See also |:VimwikiTabMakeDiaryNote| 3wy opens diary wiki-file for yesterday in the third wiki from |g:vimwiki_list|. etc. - To remap: > - :nmap dy VimwikiMakeYesterdayDiaryNote -< + + Remap command: `VimwikiMakeYesterdayDiaryNote` + See also |:VimwikiMakeYesterdayDiaryNote| -[count]wm or VimwikiMakeTomorrowDiaryNote + *vimwiki_wm* +[count]wm Open diary wiki-file for tomorrow of the [count]'s wiki. wm opens diary wiki-file for tomorrow in the current @@ -229,9 +256,9 @@ See also |:VimwikiMakeYesterdayDiaryNote| 3wm opens diary wiki-file for tomorrow in the third wiki from |g:vimwiki_list|. etc. - To remap: > - :nmap dm VimwikiMakeTomorrowDiaryNote -< + + Remap command: `VimwikiMakeTomorrowDiaryNote` + See also |:VimwikiMakeTomorrowDiaryNote| ------------------------------------------------------------------------------ @@ -3425,6 +3452,7 @@ https://github.com/vimwiki-backup/vimwiki/issues. 2.5 (in progress)~ New:~ + * PR #702: Make remapping documentation more accessible to newer vim users * PR #673: Add :VimwikiGoto key mapping. * PR #689: Allow |vimwiki-option-diary_rel_path| to be an empty string. * PR #683: Improve layout and format of key binding documentation in