Commit: runtime(doc): Update mapping descriptions

0 views
Skip to first unread message

Christian Brabandt

unread,
Jun 3, 2026, 2:00:15 PM (yesterday) Jun 3
to vim...@googlegroups.com
runtime(doc): Update mapping descriptions

Commit: https://github.com/vim/vim/commit/dec5b3a72ac616fec0db98e56fda10daad9aab65
Author: nyngwang <nyng...@gmail.com>
Date: Wed Jun 3 17:57:40 2026 +0000

runtime(doc): Update mapping descriptions

closes: https://github.com/vim/vim/issues/20411

Signed-off-by: nyngwang <nyng...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/usr_51.txt b/runtime/doc/usr_51.txt
index 82bb0faf2..e8fb68bce 100644
--- a/runtime/doc/usr_51.txt
+++ b/runtime/doc/usr_51.txt
@@ -1,4 +1,4 @@
-*usr_51.txt* For Vim version 9.2. Last change: 2026 Jun 02
+*usr_51.txt* For Vim version 9.2. Last change: 2026 Jun 03


VIM USER MANUAL by Bram Moolenaar
@@ -250,6 +250,9 @@ difference between using <SID> and <Plug>:
only conventions to keep the name readable and unlikely to clash with
other plugins. None of them are required: all that matters is that
the sequence starts with "<Plug>" and is unique.
+ A mapping whose {lhs} starts with <Plug> is always applied to the
+ {rhs} of another mapping, even if remapping is explicitly disallowed.
+ |:nore|

<SID> is the script ID, a unique identifier for a script.
Internally Vim translates <SID> to "<SNR>123_", where "123" can be any
@@ -258,6 +261,8 @@ difference between using <SID> and <Plug>:
you use the ":function" command to get a list of functions. The
translation of <SID> in mappings is exactly the same, that's how you
can call a script-local function from a mapping.
+ Note: when <SID> appears in the {rhs} of a mapping, you might consider
+ using <script>. |:map-<script>|


USER COMMAND
@@ -416,8 +421,8 @@ hasmapto() Function to test if the user already defined a mapping

map <unique> Give a warning if a mapping already exists.

-noremap <script> Use only mappings local to the script, not global
- mappings.
+noremap <script> Only remap mappings defined in this script that start
+ with <SID>.

exists(":Cmd") Check if a user command already exists.

Reply all
Reply to author
Forward
0 new messages