Questions tagged [binary-file]

Questions about editing non-text files.

Filter by
Sorted by
Tagged with
116 votes
8 answers
139k views

How to edit binary files with Vim?

Is there a way to edit binary files in some kind of hexadecimal mode? For example if I have some binary data shown by xxd or hexdump -C like this: $ hexdump -C a.bin | head -n 5 00000000 cf fa ed ...
janos's user avatar
  • 2,808
19 votes
2 answers
7k views

How to tell Vim not to try to unzip a file?

I'm trying to open an .xlsx file in Vim, but got an error saying: ***error*** (zip#Browse) unzip not available on your system I know it's a binary file, but I want to do some checksums and probably ...
Roflo's user avatar
  • 767
28 votes
3 answers
19k views

Jumping to a byte offset, and displaying position as byte offset

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: ...
200_success's user avatar
  • 9,499
14 votes
2 answers
3k views

How to get the current byte offset in whole file

I saw that you could display the current byte offset in the statusline using %o, but I found no function or command which does the same. Is there a way of getting the current byte offset ...
EvergreenTree's user avatar
5 votes
2 answers
3k views

Vim hex editor with xxd not working as intended

I'm trying to use Vim as a hex editor. I am using the %!xxd / %!xxd -r method, and it worked fine until I tried a some bytes that didn't work as expected : 00000000: 1337 6161 6161 6161 6161 6161 6161 ...
aguilbau's user avatar
4 votes
2 answers
2k views

How to check if file is binary?

Is there any way to determine within Vim that the file which I'm editing is either in text or binary format? For example: vim http://example.com/ vs: vim http://cdn.sstatic.net/vi/img/apple-touch-...
kenorb's user avatar
  • 18.3k
2 votes
2 answers
2k views

How to make Vim to uncompress archive formats?

In here it's suggested that Vim can do automatic uncompression of gzip/zip files (including other formats) and it's something built-in. How do I open compressed file then? Sample scenario: curl https:/...
kenorb's user avatar
  • 18.3k