11

How can I move the cursor to the nth byte in the buffer?

How can I display the current cursor position in the ruler in terms of the byte offset, rather than lines and columns? (Follow-up question: can it be displayed in both decimal and hexadecimal?)

15
:goto 2356

jumps to the 2356th byte in the buffer.

Use the %o field in 'statusline' or 'rulerformat' to display the byte number of the character under your cursor.

Use %O to display the value in hexadecimal format.

Reference:

:help :goto
:help 'statusline'
:help 'rulerformat'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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