Use vim to search by hex code
Solution 1:
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.
Solution 2:
Transform vim into a hex editor by doing [escape] :%!xxd
. Then search for 0x1B (/1B
).
Solution 3:
You can discover what a hex value of a character by putting the cursor on it and pressing ga
Below you will see a hex value of the character. Example for a <╬>
character
<╬> <|N> 206, Hex ce, Oct 316, Digr I>
Delete it by :
%s/\%xce//g