On 15/04/09 10:00, Andy Wokula wrote:
>
> Tony Mechelynck schrieb:
>> On 12/04/09 21:29, Matt Wozniski wrote:
>>> On Sun, Apr 12, 2009 at 2:15 PM, Tony Mechelynck wrote:
>>>> On 12/04/09 14:10, Dennis Benzinger wrote:
>>>>> Hi!
>>>>>
>>>>> How can I check if there is no search highlighting because of
>>>>> :nohlsearch opposed to :set nohlsearch ?
>>>>>
>>>>> I can check the hlsearch option with :set hlsearch? or echo&hlsearch .
>>>>> Is there a similar variable for :nohlsearch ?
>>>> I don't think you can. However you can turn it back on by using e.g.
>>>>
>>>>          /
>>>>          Ctrl-O
>>>>
>>>> (There is no :hlsearch command.)
>>> No, but IIRC,
>>>
>>> :let @/ = @/
>>>
>>> should do the trick as well.
>>>
>>> ~Matt
>>
>> I tried it before sending that post, and it doesn't.
>>
>>
>> Best regards,
>> Tony.
>
> The usual way is
>      :let&hls =&hls
>
> but I just tried this and it seems to work as well:
>      :set hls<
>
> (although it's tricky: "<" is for local options)
>

Tt, tt. As has already been said, the OP didn't want to know whether the 
'hlsearch' _option_ had been set or cleared, but whether the 
:noh[lsearch] _command_ had been used since the latest search. The 
command has no effect when the option is unset, but otherwise they are 
different things.


Best regards,
Tony.
-- 
A lot of people I know believe in positive thinking, and so do I.  I
believe everything positively stinks.
                -- Lew Col

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

Reply via email to