How to move cursor to the n-th symbol from the left in Vim?
One of the solutions I see is press 0n<right-arrow>
, it will move to the n+1 position. Is there any more natural way to do it?
Esc + i to exit insert mode and enter it again, effectively going to the beginning of line.
If you're already in vi, you can use the goto command. To do this, press Esc , type the line number, and then press Shift-g . If you press Esc and then Shift-g without specifying a line number, it will take you to the last line in the file.
We may need to end the last line from anywhere in the file. Even the cursor has located the start of the file you can move the end of the last line with the following steps. Press the ESC key. Press G to move the last line and press $ to move the end of the line.
The pipe '|' character may be what you want:
To go to 25th column in a line in normal mode press 25|
To go to 37th column in a line in normal mode press 37|
and so on. . .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With