Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In VI, I know that if you do

:some_number

and hit enter, you will jump to the line specified by "some_number". Is there an equivalent for jumping to a specific character in a single line?

Basically, I have a large csv and there is some characters that are breaking the parser; so I have to debug it.

I'm getting an error message that basically says "unexpected character on line XXX character YYY".

I know how to get to XXX but how do I get to YYY?

share|improve this question
add comment

1 Answer

up vote 10 down vote accepted

I'm not 100% sure of the meaning of the question, but if (for example) you want to find the next 'a' on a line, you'd type 'fa' (in command mode). That finds the next 'a' to the right. 'Fa' would find the next 'a' to the left.

The other way I can interpret your questions is that you want the cursor on a particular column. number| puts the curson on column number in the line the cursor already appears on.

share|improve this answer
    
I meant the latter. I've updated my question to clarify. –  Dave Sep 21 '11 at 15:04
2  
Also useful: t/T to go to the character before the given character, and ; to repeat the previous t/T/f/F. –  Edd Steel Sep 21 '11 at 17:19
1  
And , to go in the opposite direction using the same previous letter. –  Ben Jackson Sep 21 '11 at 19:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.