> I'm using vim to edit (La)TeX files.
> Some non-ASCII characters from "wild copy/paste" give problems at the 
> compilation (like the character   -> ' <- ) and it takes for ever to 
> identify them.
> I'm sure there is a vim command to "smoke them out" ?

I'm not sure you've clearly defined non-ASCII characters (as it
looks like the character you point out is ASCII 0x27, but I might
be missing something), but if you mean things over 0x7f then you
can do something like

        :%s/[^ -\x7f]//g

to remove them.  I don't know if you want to replace them with
something smarter, as that may be more desired.

Or, if you just want to find them, you can use

        /[\x80-\xff]

This just uses the standard set-of-characters notation described at

        :help /[

though it does require that "the 'l' flag is included in
'cpoptions'" (text from the above help) to get the \xNN notation.

Instead of the ranges given above (or in addition), there are
some posix character classes, so you can do things like

        /[^[:print:]]

or

        /[[:cntrl:]]

to find classes of offenders.

Hope this helps,

-tim




Reply via email to