From d0cd243200f0af9c2a633867f46f42059235f841 Mon Sep 17 00:00:00 2001 From: "Kasper B. Graversen" Date: Wed, 10 Jul 2024 12:45:40 +0200 Subject: [PATCH 1/2] Update index.md --- docs/usage/index.md | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/docs/usage/index.md b/docs/usage/index.md index 7e8cbe9a..49f30c75 100644 --- a/docs/usage/index.md +++ b/docs/usage/index.md @@ -129,7 +129,33 @@ win-vind uses **Run Commands** style configuration method. If you've ever writte #### What is a mapping? A typical key binding is a simple one that assigns a function from a set of keys. In contrast, the mapping employed in Vim is a kind of extension of key binding, a mechanism that allows recursive key assignment and command definition. -Mapping is defined using the `map` or `noremap` command. Examples of recursive key assignments are shown below. +Mapping is defined using a variety of map commands known in vim. The most commonly used are + +* `map` remaps for all modes +* `nmap` / `noremap` remaps for normal mode +* `imap` / `inoremap` remaps for insert mode + +Below is a table listing the complete set of commands for editing mappings. + +|**Syntax**|**Features**| +|:---|:---| +|`${MODE}map ${IN_CMD} ${OUT_CMD}`|Recursively define a map that is invoked by `${IN_CMD}` and generates `${OUT_CMD}`.| +|`${MODE}noremap ${IN_CMD} ${OUT_CMD}`|Non-recursively define a map that is invoked by `${IN_CMD}` and generates `${OUT_CMD}`, which is composed by the default map.| +|`${MODE}unmap ${IN_CMD}`|Remove the map corresponding to the `${IN_CMD}`.| +|`${MODE}mapclear`|Delete all maps.| +|`command ${IN_CMD} ${OUT_CMD}`|It defines the command to call the `${OUT_CMD}`.| +|`delcommand ${IN_CMD}`|Remove the command corresponding to the `{IN_CMD}`.| +|`comclear`|Delete all commands.| + +  + +`${MODE}` is the [Mode Prefix]({{ site.url }}/cheat_sheet/keywords/#mode-prefix). The keyset syntax uses the same expression as in Vim, where keys are connected by `-` between `<` and `>`. However, there is no limit to the number of combinations, and you can connect as many as you like. (e.g. ``). + + + + + +Examples of recursive key assignments are shown below. ```vim " Mapping A @@ -156,22 +182,6 @@ For example, the following mapping does not cause anything to happen in insert m inoremap g m ``` -Below is a table listing the commands for editing mappings. - -|**Syntax**|**Features**| -|:---|:---| -|`${MODE}map ${IN_CMD} ${OUT_CMD}`|Recursively define a map that is invoked by `${IN_CMD}` and generates `${OUT_CMD}`.| -|`${MODE}noremap ${IN_CMD} ${OUT_CMD}`|Non-recursively define a map that is invoked by `${IN_CMD}` and generates `${OUT_CMD}`, which is composed by the default map.| -|`${MODE}unmap ${IN_CMD}`|Remove the map corresponding to the `${IN_CMD}`.| -|`${MODE}mapclear`|Delete all maps.| -|`command ${IN_CMD} ${OUT_CMD}`|It defines the command to call the `${OUT_CMD}`.| -|`delcommand ${IN_CMD}`|Remove the command corresponding to the `{IN_CMD}`.| -|`comclear`|Delete all commands.| - -  - -`${MODE}` is the [Mode Prefix]({{ site.url }}/cheat_sheet/keywords/#mode-prefix). The keyset syntax uses the same expression as in Vim, where keys are connected by `-` between `<` and `>`. However, there is no limit to the number of combinations, and you can connect as many as you like. (e.g. ``). - #### Allow external macro As mentioned earlier, some modes of win-vind absorb keystrokes and do not propagate them to other applications. Therefore, there is a special feature called external macro. From 51c5cd05c2466a11718281c72e3519e9a91ede78 Mon Sep 17 00:00:00 2001 From: pit-ray Date: Sat, 20 Jul 2024 17:18:32 +0900 Subject: [PATCH 2/2] fix minor grammer --- docs/usage/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/index.md b/docs/usage/index.md index 49f30c75..6047edce 100644 --- a/docs/usage/index.md +++ b/docs/usage/index.md @@ -129,7 +129,7 @@ win-vind uses **Run Commands** style configuration method. If you've ever writte #### What is a mapping? A typical key binding is a simple one that assigns a function from a set of keys. In contrast, the mapping employed in Vim is a kind of extension of key binding, a mechanism that allows recursive key assignment and command definition. -Mapping is defined using a variety of map commands known in vim. The most commonly used are +Mapping is defined using a variety of map commands known in Vim. The most commonly used are: * `map` remaps for all modes * `nmap` / `noremap` remaps for normal mode