Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Go back in character search in vim?

Tags:

vim

Is there a shortcut to go back when doing a "go-to character" search in vim? Like if I press f , ; ; to find the third comma, but accidently press one more ; then necessary, is there a quick way to back one comma without doing F ,?

like image 781
user1516425 Avatar asked Jul 26 '12 18:07

user1516425


People also ask

How do I go back to vim search?

To search backward in vi/vim by pressing ? and then typing your search pattern/word. Once word found in vim, you can press the n key to go directly to the next occurrence of the word in backwards. Press the N key to go directly to the opposite direction, i.e. forwards.

How do I go back to the previous line in Vim?

To jump back to line # 300 or previous position press CTRL-O (press and hold Ctrl key and press letter O). To jump back forwards press CTRL-I (press and hold Ctrl key and press letter I).

How do I go to a specific character in Vim?

You can type f<character> to put the cursor on the next character and F<character> for the previous one. You can also use ; to repeat the operation and use , to repeat it in opposite direction.


Video Answer


1 Answers

Comma is actually bound to "Repeat latest f, t, F or T in opposite direction".

like image 200
Thor Avatar answered Oct 14 '22 07:10

Thor