aboutsummaryrefslogtreecommitdiff
path: root/vim/config/leader.vim
Commit message (Collapse)AuthorAgeFilesLines
* Check for 'eval' feature before mapleader :letTom Ryder2017-11-041-2/+4
| | | | | This was causing a tiny build of Vim to raise errors about :let being an unavailable command.
* Specify scope of mapleader variablesTom Ryder2017-11-041-2/+2
| | | | | | | | | | | | `vint -s` says: vim/config/leader.vim:2:5: Make the scope explicit like `g:mapleader` (see Anti-pattern of vimrc (Scope of identifier)) vim/config/leader.vim:3:5: Make the scope explicit like `g:maplocalleader` (see Anti-pattern of vimrc (Scope of identifier)) This does still seem to work with the prefixes, despite not being the way the documentation specifies the variables.
* Use underscore as local map leaderTom Ryder2017-11-041-0/+3
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.