Questions tagged [binary-file]

Questions about editing non-text files.

Filter by
Sorted by
Tagged with
116 votes
8 answers

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,818
19 votes
2 answers

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
30 votes
3 answers

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,559
14 votes
2 answers

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

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

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 vs: vim
kenorb's user avatar
  • 18.5k
2 votes
2 answers

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.5k