Tim Chase <[email protected]> [11-03-25 21:04]:
> On 03/25/2011 02:20 PM, [email protected] wrote:
> >After the funtino has returned control back to the user
> >the matched keywords should be highlighted as if
> >the user her-/himself did the search...
>
> My second function worked for me to do what you describe:
>
> >>If you want to have the pattern from your function highlighted upon
> >>completion, the following hack worked for me:
> >>
> >> function! Beta()
> >> " ...
> >> /pattern/;
> >> set hls
> >> let @/ = @/
> >> " ...
> >> endfunction
>
> I think the magic is in tricking vim with the ":let". Weird, but it
> worked for me (Vim7.1) (either setting 'hls' in the function or before
> it was called)
>
> -tim
>
>
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
Hi Tim,
I used
:/pattern
instead of
/pattern/
and I also add "the let-magick" to my script and...
TADA! ...it works!
Last question I have (before the next one ;) is:
Why does it work?
Best regards,
mcc
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php