:30
will move my cursor to the beginning of line 30.
How can I tell Vim to place the cursor at line y, column x? Is this possible without using the arrow keys or h
, j
, k
, l
keys?
I am running Vim version 7.3.429.
:30
will move my cursor to the beginning of line 30.
How can I tell Vim to place the cursor at line y, column x? Is this possible without using the arrow keys or h
, j
, k
, l
keys?
I am running Vim version 7.3.429.
Try a number followed by a pipe to get to the specified column in that line.
80|
should get you to position 80 in that line.
EDIT: If you are looking to go to a specific x,y position, I am not sure on that one.
Not sure it's in any way more convenient, but you can call the cursor
function directly:
:cal cursor(30, 5)
will jump to line 30, column 5.
In command mode:
Type a number followed by G (uppercase) to go to that line number.
Example: 30G goes to line 30.
Example: G goes to the last line of the buffer.
Type a number followed by | (pipe) to go to that column in the current line.
Example: 80| goes to column 80.
So: 30G80| goes to line 30, column 80.