Mapleader: improve example, mention :nmap <leader>

This commit is contained in:
Marco Hinz 2016-01-11 13:20:20 +01:00
parent f9f984651c
commit 98b0fd5efe
2 changed files with 8 additions and 6 deletions

View File

@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file.
### Changed ### Changed
- Basics: Improved [Mapleader?](README.md#mapleader)
- Usage: rewrote [Clipboard](README.md#clipboard) - Usage: rewrote [Clipboard](README.md#clipboard)
## [1.1] - 2016-01-07 ## [1.1] - 2016-01-07

View File

@ -202,16 +202,17 @@ is set to `\` by default.
nnoremap <leader>h :helpgrep<right> nnoremap <leader>h :helpgrep<right>
``` ```
This mapping is triggered by `\h`. This mapping is triggered by `\h`. If you want to use `<space>h` instead:
You can change the mapleader like this:
```viml ```viml
let mapleader = ';' let mapleader = ' '
nnoremap <leader>h :helpgrep<right>
``` ```
**Note**: It's important that the mapleader is set before the mappings that use **Note**: Set the mapleader before the mappings! All the leader mappings that
it, otherwise `\` will be used anyway. are in effect already, won't change just because the mapleader was changed.
`:nmap <leader>` will show all normal mode leader mappings with the mapleader
resolved already, so use it to double-check your mappings.
Opposed to the global `<leader>`, there's is also `<localleader>` which is Opposed to the global `<leader>`, there's is also `<localleader>` which is
supposed to be used in filetype-specific plugins. There is no default set for supposed to be used in filetype-specific plugins. There is no default set for