]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(doc): Update mapping descriptions
authornyngwang <nyngwang@gmail.com>
Wed, 3 Jun 2026 17:57:40 +0000 (17:57 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 3 Jun 2026 17:58:28 +0000 (17:58 +0000)
closes: #20411

Signed-off-by: nyngwang <nyngwang@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/usr_51.txt

index 82bb0faf225d484e09e4bca1151d62bd9c45009d..e8fb68bcede43374bb5a7690524d0effe2ea5122 100644 (file)
@@ -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.