From acec3d790704ab65a0c4229f4355e99fafcbdde5 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 4 Nov 2017 00:45:41 +1300 Subject: 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 l for 'list' toggling and filetype linting. From ":help maplocalleader": > is just like , except that it uses > "maplocalleader" instead of "mapleader". is to be used > for mappings which are local to a buffer. Example: > > :map A oanother line > > In a global plugin should be used and in a filetype plugin > . "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. --- vim/config/leader.vim | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 vim/config/leader.vim 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 = '_' -- cgit v1.2.3