Today, I had the need of being able to view multiple iterations of a csv file
in hex, as I keep updating/saving it. That’s when I came across vim’s xxd
command.
So, I decided to bind the command to another key and display the hex
output
in a vim split.
Here’s the function:
function! TerminalPreviewHexDump()
new % | terminal ! xxd %
endfu
map <silent> <leader>h :call TerminalPreviewHexDump()<CR>
Now, typing
For advanced usage type :help xxd
for more information