diff options
authorTom Ryder <tom@sanctum.geek.nz>2017-11-04 00:45:41 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-04 00:45:41 +1300
commitacec3d790704ab65a0c4229f4355e99fafcbdde5 (patch)
parentad80283eec33af208d6bf24834809e351f54f90f (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
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 = '_'