diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-04 00:45:41 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-04 00:45:41 +1300 |
commit | acec3d790704ab65a0c4229f4355e99fafcbdde5 (patch) | |
tree | 867b48c3e35eb8f000d65c9fb167876194690c1e /vim | |
parent | Add check and lint mappings for shell script (diff) | |
download | dotfiles-acec3d790704ab65a0c4229f4355e99fafcbdde5.tar.gz dotfiles-acec3d790704ab65a0c4229f4355e99fafcbdde5.zip |
Use underscore as local map leader
This should allow me to mentally separate actions specific to a buffer
type from actions that apply to buffers in general. It also removes the
overlap of <leader>l for 'list' toggling and filetype linting.
From ":help 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. Example:
>
> :map <buffer> <LocalLeader>A oanother line<Esc>
>
> In a global plugin <Leader> should be used and in a filetype plugin
> <LocalLeader>. "mapleader" and "maplocalleader" can be equal.
> Although, if you make them different, there is a smaller chance of
> mappings from global plugins to clash with mappings for filetype
> plugins. For example, you could keep "mapleader" at the default
> backslash, and set "maplocalleader" to an underscore.
Diffstat (limited to 'vim')
-rw-r--r-- | vim/config/leader.vim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vim/config/leader.vim b/vim/config/leader.vim new file mode 100644 index 00000000..2d7b98ae --- /dev/null +++ b/vim/config/leader.vim @@ -0,0 +1,3 @@ +" Use different keys for global and local leaders +let mapleader = '\' +let maplocalleader = '_' |