map localleader are explained very nicely here. How do I read the current value of the
<localleader> thingy? Is this a variable or what?
<LocalLeader> maplocalleader <LocalLeader> is just like <Leader>, except that it uses "maplocalleader" instead of "mapleader". <LocalLeader> is to be used for mappings which are local to a buffer.
Recursing on to
:h <Leader> (which is just above this paragraph):
<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> Works like: :map \A oanother line<Esc> But after: :let mapleader = "," It works like: :map ,A oanother line<Esc>
mapleader is a variable, and therefore
maplocalleader is too.
The tricky part, of course, is that neither is set by default - and so Vim uses
\ as the leader. If you try to examine the value of these two variables, by e.g.,
let maplocalleader or
echo mapleader, Vim will just throw an error:
E121: Undefined variable: mapleader
How do you set it? The
<Leader> help quoted above has an example:
let mapleader = ","
Similarly, for example:
let maplocalleader = "_"