nearly_lunchtime
nearly_lunchtime

Reputation: 12923

Jump / Position cursor in Vim

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

Upvotes: 32

Views: 18720

Answers (2)

Mykola Golubyev
Mykola Golubyev

Reputation: 59814

Enter:

024l

Explanation:

0: move the cursor to the first character on the current line
24l: move the cursor to the right 24 times (thereby arriving on the 25th column)

Upvotes: 18

Oli
Oli

Reputation: 15942

In normal mode, use the pipe character:

25|

will move you to column 25 on the same line

Upvotes: 77

Related Questions