Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 0.93 KB | None | 0 0
  1. *<Leader>* *mapleader*
  2.                                        
  3. To define a mapping which uses the "mapleader" variable, the special string
  4. "<Leader>" can be used.  It is replaced with the string value of "mapleader".
  5. If "mapleader" is not set or empty, a backslash is used instead.  Example: >
  6.         :map <Leader>A  oanother line<Esc>
  7. Works like: >
  8.         :map \A  oanother line<Esc>
  9. But after: >
  10.         :let mapleader = ","
  11. It works like: >
  12.         :map ,A  oanother line<Esc>
  13.  
  14. Note that the value of "mapleader" is used at the moment the mapping is
  15. defined.  Changing "mapleader" after that has no effect for already defined
  16. mappings.
  17.  
  18.  
  19.                                         *<LocalLeader>* *maplocalleader*
  20. <LocalLeader> is just like <Leader>, except that it uses "maplocalleader"
  21. instead of "mapleader".  <LocalLeader> is to be used for mappings which are
  22. local to a buffer.  Example: >
  23.       :map <LocalLeader>q  \DoItNow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement