I have this problem: a program of mine is giving me error positions
based on the file offset and not the line containing the error.
Eg. it does not warn me about an error on line "12", but at the "char 2032"

Is there any command in Vim to position to that char offset?

If the data is on one line, the pipe command takes a column offset, so in normal mode, just use

        2032|

(that's "two zero three two pipe")

A fabulous feature when you're dealing with data where columns matter (as in column-delimited data files) that drives me nuts when I don't have it in other editors. Score yet one more point for vim. :)

If the data is *not* all on one line, you can use "[count]go" in normal mode, or ":[count]go" in Ex mode to go to the particular byte-offset in the file. So in your case, you can just use

        2032go
or
        :2032go
or
        :go 2032

You can learn more at

        :help bar
        :help :go

-tim




Reply via email to