Use vim to search by hex code
Search (e.g. using /) for \%x1b
.
You can also type control characters, including escape, into the command line by preceding them with Ctrl-V. So type /, Ctrl-V, Esc, Enter.
Transform vim into a hex editor by doing [escape] :%!xxd
. Then search for 0x1B (/1B
).