Display invisible characters in vim


When I compile my source with Latex, I get the following error message

Unicode char \u8:  not set up for use with LaTeX.

Now I suspect that this is due to an invisible character. The command :set list doesn't show anything suspicious and :set display+=uhex doesn't seem to work for me. This post lets me assume that I also have something fishy going on.

Is there a way in vim to show everything that is in my file that is not a printable character? I am using MacVim Version 7.3 (53).

Best Answer

you could:

:setlocal display=uhex

to display non-ascii chars by their hex-number. and you might also try to highlite non-printable chars by:

:set hlsearch

then there is the isprint option which controls which chars are 'printable'.

if that does not help you might want to :%!xxd and check byte by byte if there is something 'fishy' around the spot you encounter the problem.

Related Question