Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jump / Position cursor in Vim

Tags:

vim

How can I move the cursor to, say, position 25 on the current line?

like image 655
nearly_lunchtime Avatar asked Apr 02 '09 09:04

nearly_lunchtime


People also ask

How do I go to previous cursor position in Vim?

Show activity on this post. You can also use g; and g, to move back- and forward in the list of your previous edit locations.

How do you jump a line in Vim?

If we are in the vim editor, then simply do this, “Press the ENTER key, write the Line number, and press Shift+ g”: Again the output is the same.

How do I jump to a character in Vim?

You can type f<character> to put the cursor on the next character and F<character> for the previous one.

How do I jump to the last line in Vim?

In short press the Esc key and then press Shift + G to move cursor to end of file in vi or vim text editor under Linux and Unix-like systems.


1 Answers

In normal mode, use the pipe character:

25| 

will move you to column 25 on the same line

like image 125
Oli Avatar answered Oct 30 '22 11:10

Oli