diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-01 14:04:55 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-01 21:54:18 +0800 |
commit | 6963c2bdcd3cc2a2f0466b23152e80fc0d037a2c (patch) | |
tree | 6f59c3dbb1e255f1727257bd46cf945a2976f200 /runtime | |
parent | 5c72640bc2b60a018ccfcf18bca809b635f250f6 (diff) | |
download | rneovim-6963c2bdcd3cc2a2f0466b23152e80fc0d037a2c.tar.gz rneovim-6963c2bdcd3cc2a2f0466b23152e80fc0d037a2c.tar.bz2 rneovim-6963c2bdcd3cc2a2f0466b23152e80fc0d037a2c.zip |
vim-patch:8.2.0815: maparg() does not provide enough information for mapset()
Problem: maparg() does not provide enough information for mapset().
Solution: Add "lhsraw" and "lhsrawalt" items. Drop "simplified"
https://github.com/vim/vim/commit/9c65253fe702ea010afec11aa971acd542c35de2
vim-patch:9.0.0127: unused variable
Problem: Unused variable.
Solution: Remove the variable. (closes vim/vim#10829)
https://github.com/vim/vim/commit/e95f22f63a1871b91e5508088e5ae4905ce28cd7
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/builtin.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 994f1ab7f5..e2a8e098d2 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -295,7 +295,7 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) rhs of mapping {name} in mode {mode} mapcheck({name} [, {mode} [, {abbr}]]) String check for mappings matching {name} -mapset({name}, {mode}, {abbr}, {dict} +mapset({mode}, {abbr}, {dict}) none restore mapping from |maparg()| result match({expr}, {pat} [, {start} [, {count}]]) Number position where {pat} matches in {expr} @@ -4752,7 +4752,10 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* When {dict} is there and it is |TRUE| return a dictionary containing all the information of the mapping with the following items: - "lhs" The {lhs} of the mapping. + "lhs" The {lhs} of the mapping as it would be typed + "lhsraw" The {lhs} of the mapping as raw bytes + "lhsrawalt" The {lhs} of the mapping as raw bytes, alternate + form, only present when it differs from "lhsraw" "rhs" The {rhs} of the mapping as typed. "silent" 1 for a |:map-silent| mapping, else 0. "noremap" 1 if the {rhs} of the mapping is not remappable. @@ -4770,7 +4773,6 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* "lnum" The line number in "sid", zero if unknown. "nowait" Do not wait for other, longer mappings. (|:map-<nowait>|). - "simplified" The dictionary can be used to restore a mapping with |mapset()|. @@ -4822,8 +4824,8 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()* mapset({mode}, {abbr}, {dict}) *mapset()* Restore a mapping from a dictionary returned by |maparg()|. - {name}, {mode} and {abbr} should be the same as for the call - to |maparg()|. + {mode} and {abbr} should be the same as for the call to + |maparg()|. *E460* {mode} is used to define the mode in which the mapping is set, not the "mode" entry in {dict}. Example for saving and restoring a mapping: > @@ -4831,7 +4833,11 @@ mapset({mode}, {abbr}, {dict}) *mapset()* nnoremap K somethingelse ... call mapset('n', 0, save_map) -< +< Note that if you are going to replace a map in several modes, + e.g. with `:map!`, you need to save the mapping for all of + them, since they can differe. + + match({expr}, {pat} [, {start} [, {count}]]) *match()* When {expr} is a |List| then this returns the index of the first item where {pat} matches. Each item is used as a |