Change going forward and backward when searching for a character in a line

Viewed 39

When I use vim to find a letter in a line I use the f key and then to repeat the motion forward I have to use ; and to repeat the motion backwards I have to use ,. However, I would like to do change this and go forwards with , and backwards with ;. What exactly would I have to put in my vimrc?

1 Answers

You don't need to put anything in your .vimrc; this already exists. You may need to change the way you search for characters though.

If you use f and t to search for characters, ; goes forward, while , goes backwards.

However…

If you use F and T to search for characters, , goes forward, while ; goes backwards.

Related