After using the f{char} motion, is it possible to change directions so ; will go backwards (as if you used F{char})? (And vice-versa and with tT.)
I’m going to try using , as LocalLeader and I have this to let me access , again:
let maplocalleader = ','
nnoremap <LocalLeader><LocalLeader> <LocalLeader>
But I wonder if I can map <LocalLeader>; to make ; switch between acting like ; and ,. I don’t see anywhere the character for f is stored, so can I do this?
No, this cannot be done, unless you re-implement the
fcommand yourself (which isn’t so difficult as it sounds; there are actually plugins that enhance it to search in subsequent lines, too). It can be done forn/N(viav:searchforward), though.In general, I would advise from employing such clever “tricks”; they retrain your muscle memory, and cause problems in other environments with vi-like keybindings (Pentadactyl, Bash, readline, some IDEs). Rather, rethink your approach to mappings.