Friday, October 7, 2022

Re: Play sound on search wrap

On 2022-10-06, Arun <findanarun@gmail.com> wrote:
> You could try a hack by calling a function that checks for v:warningmsg and
> reset it, in a "statusline" invoked function. Something like:
>
> ---
> fu! CheckWrap()
> if v:warningmsg =~# "^search hit [BT]"
> "Ring bell
> exe "norm! \<Esc>"
> endif
> let v:warningmsg=""
> endf
> "call CheckWrap using standard statusline
> set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P%{CheckWrap()}
> ---
>
> The above should ring the bell (provided you did not disable it) on search
> wraps.

Aha, hackish, but that does work!

Thanks,
Life.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/thq2ah%24g9e%241%40ciao.gmane.io.

No comments: