How to move cursor to a specific byte in Vim?

In Vim, '20G' moves the cursor to line 20 in command mode. But how to move the cursor to a specific byte in Vim?

asked Feb 10, 2016 by anonymous

1 Answer

In normal mode,

20go

will move the cursor to byte 20.

Or in command line,

:goto 20

or

:go 20

From vimdoc:

:[range]go[to] [count]
[count]go
            Go to {count} byte in the buffer.  Default [count] is
			one, start of the file.  When giving [range], the
			last number in it used as the byte count.  End-of-line
			characters are counted depending on the current
			'fileformat' setting.
answered Mar 15, 2016 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...