How to move cursor to the n-th symbol from the left in Vim?
One of the solutions I see is press 0n
, it will move to the n+1 position. Is
I'm not sure if you mean the nth character or nth occurrence of a character; the second has been answered so I will answer the first.
^
will take you to the start of the line excluding whitespace (so to the first non-white column) and |
(pipe) or 0
(zero) will take you to the first character. Then l
(lowercase L) will take you to the right; and 7l
will take you seven characters to the right. So all together, to go to the (n+1)th character on the line, for n=7, 07l
.