On Mon, May 15, 2006 at 12:07:55AM +0300, Yakov Lerner wrote:
> On 5/14/06, Benji Fisher <[EMAIL PROTECTED]> wrote:
> >
> > I have not tried it inside a function, but
> >
> >:set hls
> >
> >seems to undo the effect of
> >
> >:nohls
> >
> >so perhaps a work-around is to add
> >
> >:if &hls | set hls | endif
> >
> >either to the function or (replacing "|" by "<Bar>") to the mapping.
>
> Yes, adding '<bar>set hls' to rhs of the mapping (outside
> function) solves it. (But adding ':set hls' inside function
> doesn't). I realize now that this is probably by design.
If this is for your personal use, do what you please. If you plan
to distribute this script, I suggest using the :if since the end user
might be annoyed by having 'hls' set unconditionally.
HTH --Benji Fisher