Compare two files in hexadecimal view

Just a quick and dirty list for myself. When I was looking for hexeditors with a file-compare view, these came up. All three of these options seem useful in slightly different ways.
vbindiff
dhex
vimdiff and :%!xxd
Vimdiff just calls vim with a bunch of preset options.

vimdiff file1 file2

Once inside, you have to convert each file with :%!xxd and then after making any changes, convert back with :%!xxd -r before saving. Slightly clunky, and I’m sure there’s a way to automate all that. But I was only making select changes. And a few keystrokes isn’t so bad.

vim set regextype perl

The problem

Vim is a great editor. I use it every day, and that includes weekends. I’ve run into an issue where to search with the regular expression (dest|path): I needed to escape the parentheses and the pipe. That gets tedious.

The solution

I found my solution at stackoverflow: http://stackoverflow.com/questions/5770058/vim-and-regular-expression-what-kind-of-regex-does-vim-use/26600989#26600989.

At the beginning of your search expression, use \v which then uses a “very magic” regex mode in which fewer escapes are needed.

/\v(dest|path):