[SATLUG] searching for a hexvalue with vi
h_oudini at hotmail.com
Thu Dec 20 12:01:34 CST 2007
Borries Demeler wrote:
>>> You can try
>>> Where is Ctrl-v.
>> That's strange, I typed ":%s/< C - V> xA0//g" (but without the spaces
>> between the 'C' and 'V'). I wasn't suggesting searching for "xA0",
>> instead in the search press Ctrl-c, then x, then 'A0'. I hope this makes
> Sorry, not clear enough yet - what exactly are the key strokes?
> :%s/Ctrl-c, x, A, 0 doesn't do it for me.
> THanks! -Borries
>> i'm is proud to present Cause Effect, a series about real people making a difference.
>> SATLUG mailing list
>> SATLUG at satlug.org
>> http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
>> Powered by Rackspace (www.rackspace.com)
I just opened up a binary file (in text mode) and tried searching for
and it found 33 instances of 'A0' (displayed as 'A '). I then did a
search/replace or 0x99 for 0xA0:
And it replaced 33 instances. I then replaced 0x99 with 0xA0 and 33
instances were replaced.
When you actually press Ctrl-c you'll see '^', then when you type 'a'
then '0', you'll see an 'A' and a ' '. When you press x99,
you'll see ''. Anyhow, that seems to work for me. Perhaps you could
send a snippet of the file?
Get the power of Windows + Web with the new Windows Live.
More information about the SATLUG