In general, the safest keys to use for the {lhs} (left-hand
side) of mappings are the F keys. Almost everything else
already has a function in Vim. Among

Worth knowing. Thanks. What about when using a leader such as
"," or "/" ?

The comma does a reverse-search of the last thing you searched for using t/T/f/F which many folks don't use (so they use it for leader), but I use regularly.

        :help ,
        :help ;

The forward slash does searching...something used quite regularly.

        :help /

I think the only key that isn't reserved (in that Vim doesn't already have meaning assigned to it) is the backslash, which is what the leader defaults to (so in a way, it is used...but only for the purpose you describe). I tend to use the default backslash as my leader (on those rare occasions I use the leader) because I know it's available and it's vim-portable.

One other candidate might be the underscore, though it's a shifted key which makes it a little more difficult, it is usually in a pretty predictable place (unlike the backslash/pipe key which I find all over the keyboard depending on whose machine I'm using...makes typing DOS file-paths a pain).

Just my $0.02

-tim


Reply via email to