runtime(doc): Update mapping descriptions
Commit:
https://github.com/vim/vim/commit/dec5b3a72ac616fec0db98e56fda10daad9aab65
Author: nyngwang <[email protected]>
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 <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
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.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1wUpsr-003nVx-2v%40256bit.org.