JohnBeckett (talk | contribs) (→Comments: fix link for merged tip) |
(Change <tt> to <code>, perhaps also minor tweak.) |
||
Line 3: | Line 3: | ||
|previous=790 |
|previous=790 |
||
|next=792 |
|next=792 |
||
− | |created= |
+ | |created=2004 |
|complexity=basic |
|complexity=basic |
||
|author=zzapper |
|author=zzapper |
||
Line 11: | Line 11: | ||
|category2= |
|category2= |
||
}} |
}} |
||
− | Occasionally when you've pasted into Vim from some other application, you get a pesky visible non-ascii character. You can do a < |
+ | Occasionally when you've pasted into Vim from some other application, you get a pesky visible non-ascii character. You can do a <code>ga</code> 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: |
Here's a technique. Place the cursor on the character, then: |
Latest revision as of 05:48, 13 July 2012
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)
References[]
Comments[]
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:[]
- :help i_CTRL-V_digit (which applies also on the command-line, notwithstanding its i_ initial) about additional ways to enter a character by its hex value (below 0x100: by its hex, decimal, or octal value)
- to enable/disable keymaps on the command-line: :help 'iminsert', :help 'imsearch', :help c_CTRL-^
--Tonymec 23:38, 20 August 2009 (UTC)