I can customize the n and N keys to always search backward and forward respectively irrespective of what the last search direction was with the following commands:
nnoremap <expr> n (v:searchforward ? 'n' : 'N') nnoremap <expr> N (v:searchforward ? 'N' : 'n')
I want to achieve similar effects for the , and ; keys, i.e. I want , to always jump backward and ; to always jump forward. But I can't find any similar variable in
:h eval.txt for this purpose. Maybe I'm missing some thing.
How do I make , and ; unaware of the direction of the latest