Ring bell when search wraps? (i.e. on "search hit BOTTOM, continuing at TOP")

39 views
Skip to first unread message

Asheq Imran

unread,
Dec 16, 2017, 12:16:54 AM12/16/17
to vim_use
When I search for something and it it wraps to the other end of the buffer, I sometimes feel disoriented about where I am in the buffer because I miss the message that says "search hit BOTTOM, continuing at TOP".

I would like for the bell to ring so the wrap is more obvious.

Can I do it, or should I open an issue on Github? I imagine this helping a lot of people.

JohnBeckett

unread,
Dec 17, 2017, 3:49:21 AM12/17/17
to vim_use
On Saturday, December 16, 2017 at 4:16:54 PM UTC+11, Asheq Imran wrote:
> I miss the message that says
> "search hit BOTTOM, continuing at TOP"

The solution is to adjust the highlight that applies to that message. That depends on what colorscheme you use, but if using a dark background, something like the following works.

:hi WarningMsg ctermfg=15 ctermbg=12 guifg=White guibg=Red gui=NONE

John

Ben Fritz

unread,
Jan 5, 2018, 3:11:09 PM1/5/18
to vim_use


See https://github.com/vim/vim/pull/1009 for a patch allowing this, and some vimscript examples in the comments to make it happen.

Reply all
Reply to author
Forward
0 new messages