Friday, January 29, 2010

Re: search for null

2010/1/29 Dominique Pellé <dominique.pelle@gmail.com>:
> Ron Olson wrote:
>
>> Hi all-
>>
>> Is there a particular way I can use to search for instances of null
>> (ascii 0, hex 0x0) in a file? I haven't come up with a way to do so,
>> yet there is clearly a null in my file as moving over it shows ascii 0
>> and hex 0x0, I just want to find/highlight all the others.
>>
>> Thanks.
>
> $ vim -u NONE -U NONE -c 'set hls dy=uhex'
>
> Then search for NUL char with:
>
> /<c-v>000<Enter>
>
> (where <c-v> is "control-v" key)
>
> and I see the NUL chars highlighted.

In terminal vim,

/<C-v><C-space>

will probably also do the trick. Useful to know sometimes, but
probably not too helpful in gvim.

~Matt

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment