vimagic: identifying and treating non-printable or other strange characters

4 Jan

reset vim’s internal representation of what printable characters are, then find all non-printable chars except “TAB” (note that “^I” means literally pressing the TAB-key):

:set isprint=

UPDATE: a nicer way to achieve this is to activate search-highlighting and then search for characters in the range 0×7f – 0xff (this way vim displays the printable chars like german umlauts, but they’re highlighted, so you can identify them easily):

:set hlsearch

(see also: vim-wiki, vimtips)