Fandom

Vim Tips Wiki

Search for non-ASCII characters

1,624pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Tip 791 Printable Monobook Previous Next

created 2004 · complexity basic · author zzapper · version 5.7


Occasionally when you've pasted into Vim from some other application, you get a pesky visible non-ascii character. You can do a ga command to see what it is, but you might want to search for it or substitute it.

Here's a technique. Place the cursor on the character, then:

yl # yank one character into unnamed buffer
/<C-R><C-R>" # pull unnamed buffer contents onto search (that's two presses of Control-R)

ReferencesEdit

CommentsEdit

See file format for more details if the character in question is a Carriage Return (^M or \r).


Try ^V^M (two CTRL+keystrokes).


For cleaning up win/dos text files for *nix, there's dos2unix (aka fromdos).


See also:Edit

--Tonymec 23:38, 20 August 2009 (UTC)

Also on Fandom

Random Wiki