summaryrefslogtreecommitdiffstats
path: root/runtime/doc/map.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-07-25 15:42:07 +0100
committerBram Moolenaar <Bram@vim.org>2022-07-25 15:42:07 +0100
commitb529cfbd04c02e31cfa88f2c8d88b5ff532d4f7d (patch)
treedc432e1b5129a6cdddf67ae6468e72315a0452b6 /runtime/doc/map.txt
parentcd6ad6439da2ee2d1a8a6934c9d69e9c2664ba55 (diff)
Update runtime files
Diffstat (limited to 'runtime/doc/map.txt')
-rw-r--r--runtime/doc/map.txt23
1 files changed, 13 insertions, 10 deletions
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index e4332b8d4a..69557d6146 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -682,19 +682,22 @@ two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then or
otherwise it would be impossible to type the รก character.
*<Leader>* *mapleader*
-To define a mapping which uses the "mapleader" variable, the special string
-"<Leader>" can be used. It is replaced with the string value of "mapleader".
-If "mapleader" is not set or empty, a backslash is used instead. Example: >
- :map <Leader>A oanother line<Esc>
+To define a mapping which uses the "g:mapleader" variable, the special string
+"<Leader>" can be used. It is replaced with the string value of
+"g:mapleader". If "g:mapleader" is not set or empty, a backslash is used
+instead. Example: >
+ map <Leader>A oanother line<Esc>
Works like: >
- :map \A oanother line<Esc>
-But after: >
- :let mapleader = ","
+ map \A oanother line<Esc>
+But after (legacy script): >
+ let mapleader = ","
+Or (Vim9 script): >
+ g:mapleader = ","
It works like: >
- :map ,A oanother line<Esc>
+ map ,A oanother line<Esc>
-Note that the value of "mapleader" is used at the moment the mapping is
-defined. Changing "mapleader" after that has no effect for already defined
+Note that the value of "g:mapleader" is used at the moment the mapping is
+defined. Changing "g:mapleader" after that has no effect for already defined
mappings.
*<LocalLeader>* *maplocalleader*