Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ring a bell if search hit top/bottom and is continuing #695

Closed
wants to merge 1 commit into from

Conversation

coot
Copy link
Contributor

@coot coot commented Mar 18, 2016

Also add 'bo' option value: topbot, which removes the bell.

Also add 'bo' option value: `topbot`, which removes the bell.
@chdiza
Copy link

chdiza commented Mar 18, 2016

The default should be for the bell to NOT ring. Please don't make everyone tweak their vimrc just to get the behavior that's always been there.

Also, according to the docs (at :h belloff, after the list), normal mode bells are all governed by error. But a search hitting top/bottom is a normal mode event.

@coot
Copy link
Contributor Author

coot commented Mar 21, 2016

Ups, you're absolutely right! Though I would like to have more control over bell in normal mode, for me the bell is useful only on the search hit top/bottom event.

@brammool
Copy link
Contributor

Most users don't like adding a bell, even a visual one. Let's not do this.

@brammool brammool closed this Aug 21, 2016
@fritzophrenic
Copy link
Contributor

Please reconsider. The "search hit bottom, continuing at top" is very easy to miss. Setting "nowrapscan" is too drastic. As far as I know it's not possible for Vim to act like most other programs with search support, which will reach the bottom and ASK whether to continue searching at the top.

@chrisbra
Copy link
Member

On Do, 25 Aug 2016, fritzophrenic wrote:

Please reconsider. The "search hit bottom, continuing at top" is very
easy to miss. Setting "nowrapscan" is too drastic. As far as I know
it's not possible for Vim to act like most other programs with search
support, which will reach the bottom and ASK whether to continue
searching at the top.

Then, perhaps don't ring the bell, but do something other?

Best,

Christian

Die höchste Form der Eitelkeit ist die Ruhmesliebe.
-- George de Santayana

@fritzophrenic
Copy link
Contributor

On Thu, Aug 25, 2016 at 9:56 AM, Christian Brabandt <
notifications@github.com> wrote:

On Do, 25 Aug 2016, fritzophrenic wrote:

Please reconsider. The "search hit bottom, continuing at top" is very
easy to miss. Setting "nowrapscan" is too drastic. As far as I know
it's not possible for Vim to act like most other programs with search
support, which will reach the bottom and ASK whether to continue
searching at the top.

Then, perhaps don't ring the bell, but do something other?

A different solution to the problem would be acceptable. But it needs to be
attention-grabbing. :-)

At one point there was a proposal for an autocmd event which could trigger
on errors. That would probably have allowed setting nowrapscan, catching
the error for no more matches, and starting over again from the top. But
that proposal got rejected IIRC.

@coot
Copy link
Contributor Author

coot commented Aug 25, 2016

I've been using this patch for some time. I don't like a bell, but this
was the easiest solution that grabs attention and it works well for me
(I use the bell only for this purpose).
Another thing I can think of is to flash the screen, this can seem
drastic but the background color for that could be configurable - while
the bell is not and it might not work well you're listening to music.
Another idea would be to just change flash the status line. All of them
could be implemented if vim had an autocommand group for this case.

Cheers,
Marcin

On 08:00 Thu 25 Aug , fritzophrenic wrote:

On Thu, Aug 25, 2016 at 9:56 AM, Christian Brabandt <
notifications@github.com> wrote:

On Do, 25 Aug 2016, fritzophrenic wrote:

Please reconsider. The "search hit bottom, continuing at top" is very
easy to miss. Setting "nowrapscan" is too drastic. As far as I know
it's not possible for Vim to act like most other programs with search
support, which will reach the bottom and ASK whether to continue
searching at the top.

Then, perhaps don't ring the bell, but do something other?

A different solution to the problem would be acceptable. But it needs to be
attention-grabbing. :-)

At one point there was a proposal for an autocmd event which could trigger
on errors. That would probably have allowed setting nowrapscan, catching
the error for no more matches, and starting over again from the top. But
that proposal got rejected IIRC.

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#695 (comment)

@netjune
Copy link

netjune commented Aug 29, 2016

Maybe wen can borrow the idea from emacs: Only show an warnning message
at the first time; Do wrapscan at the second time.

@fritzophrenic
Copy link
Contributor

Looks like pull request #1009 was added as an alternate way to get the user's attention in a user-configurable manner, by adding an autocmd event to let the user specify an action.

@coot coot deleted the hitbottom_bell branch March 29, 2018 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants