Questions tagged [xxd]
`xxd` is an external program that ships with Vim for converting text files and binary files.
9
questions
116
votes
8
answers
141k
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 ...
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 ...
2
votes
1
answer
588
views
Convert a binary dump back to text in vi?
Select text in vim and convert it to a hex dump...
:'<,'>!xxd
(Note 2 hex characters represent a single letter...in whatever encoding I did this in...)
Select a hex dump in vim and convert it ...
1
vote
0
answers
3k
views
Using xxd in Windows
I installed gvim82 to specifically use the xxd command in windows. I ran the :!xxd -i command followed by file_name.txt > header_file_name.h in the windows command prompt but nothing happens, not ...
3
votes
1
answer
18k
views
Where is xxd in Windows gvim?
Does it exist? Is it Linux only? Do I have to install it?
According to this, it's :!xxd to convert the file to hex, and it's :!xxd -r to convert it back again.
1
vote
1
answer
206
views
Avoiding unwanted TextChanged events to avoid 'modified' (hex editing)
Huh?
From this interesting
post, I took the
idea to incorporate xxd into vim a little more nicely than the usual %!xxd.
So I started structuring the code and testing. (It's a first draft.)
Link to ...
5
votes
1
answer
3k
views
start vi automatically in hex mode
Once I run vi a.out, I can type :%!xxd, but I'm unable to automate the process like
start vi automatically in hex mode
create a key mapping from F1 to :%!xxd
3
votes
1
answer
1k
views
Why is `%!xxd -r` result wrong while `xxd -r` from console with the same input works correctly?
I have the following file named asterix:
0000000: 15 00 1f c1 13 31 49 80 02 64 01 08 42 48 ef 28
0000010: 2d cd 0c 02 00 07 f1 e9 1b 04 63 30 c7 08 20
When I open this file in vim, I ...
5
votes
0
answers
342
views
Encoding issue with filename in MacVim
Question
In MacVim I type :tabe jäderberg.txt to open a buffer for that file. The file does not yet exist. My status line displays the file name jäderberg.txt. I do i<C-r>% to put the file name ...