On 2014-08-24 13:16, Óscar Pereira wrote: > let g:mapleader = "," > let g:maplocalleader = ";" > nnoremap - ; > nnoremap _ , > > Now repeating a previous character search is done with a dash, and > repeating a previous character search in reverse is done with an > underscore. This works really nicely, and I see no drawbacks -- > other than the fact that it changes a vim default command... > > Does anyone see any problems with this solution, or has any other > better alternatives?
I tend to not remap built-ins unless they have duplicates, so I leave ,/; as their default (I use them ALL the time) and leave "\" as the default leader. I've never had to use "g:maplocalleader", but I'd consider "+" or Enter because they both perform the same action, so remapping one of them doesn't interfere with using the other. Alternatively, I'd consider the "_" which I don't use because it's functionally almost identical to "+"/Enter except the count is reduced by one (I find that pretty useless). Some folks also remap "Q" because going into Ex mode doesn't really net you much unless you know ahead of time that you're going to enter lots of Ex commands consecutively. I find that, if I'm reaching to remap something and it clashes with an existing Vim key that I didn't know about, it's a good opportunity to read up on that conflicting key and see if I can integrate it into my day-to-day vimming. -tim
signature.asc
Description: PGP signature
