|author||Tom Ryder <email@example.com>||2017-11-04 00:45:41 +1300|
|committer||Tom Ryder <firstname.lastname@example.org>||2017-11-04 00:45:41 +1300|
|parent||Add check and lint mappings for shell script (diff)|
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.
1 files changed, 3 insertions, 0 deletions
diff --git a/vim/config/leader.vim b/vim/config/leader.vim
new file mode 100644
@@ -0,0 +1,3 @@
+" Use different keys for global and local leaders
+let mapleader = '\'
+let maplocalleader = '_'