Christian wrote:

> Updates:
>       Labels: patch
> 
> Comment #10 on issue 319 by [email protected]: New option to not  
> beep with 'showmatch'
> https://code.google.com/p/vim/issues/detail?id=319
> 
> Here is a patch, that implements the 'bellon' option. If anybody has a  
> better name, I am all ear ;)
> Anyway, Documentation like this:
>                                               *'bellon'* *'bo'*
> 'bellon' 'bo'         string  (default "bCceEghiLmoqrsSwy<")
>                       global
>                       {not in Vi}
>       This option lets you finetune, whenn a bell (visual or accustic) will
>       occur.
> 
>       It is a list of flags, when the flag is set, on those occasions a bell
>       will b rung.
>        flag   meaning when present    ~
>         b     error when pressing <BS> or <Del> in insert mode and the char
>               can't be deleted.
>         c     Error occured when using |i_CTRL-X_CTRL-K| or |i_CTRL-X_CTRL-T|
>         C     Fail to move around using the cursor keys or
>               <PageUp>/<PageDown> in insert mode.
>         e     other Error occured (e.g. try to join last line)
>         E     hitting <Esc> in normal mode
>         g     unknown Char after <C-G> in insert mode
>         h     error occued when using hangul input
>         i     pressing <Esc> in 'insertmode'
>         L     calling the beep module for Lua/Mzschem/TCL
>         m     'showmatch' error
>         o     empty region error |cpo-E|
>         q     In Visual mode, Hitting |Q|
>         r     Unknown register after <C-R> in insert mode.
>         s     Bell from shell output |:!|
>         S     Error on spell suggest
>         w     More matches in wild mode available
>         y     can't copy char from insert mode using i_CTRL-Y or i_CTRL-E
>         <     can't |g<|
> 
>       This is most usefule, to finetune when in insert mode the bell should
>       be rung. For normal mode and ex commands, the bell is often rung to
>       indicate that an error occured. It can be silenced by removing the 'E'
>       flag then.
> 
> Build passed: https://travis-ci.org/chrisbra/vim-ci/builds/48553540
> 
> Attachments:
>       beep_issue319  13.9 KB

Thanks for the idea and the patch.

Although single-character flags are not uncommon in Vim, they are hard
to read back.  Newer options have short names, using a comma separated
list.  This would also allow a value such as "all" or "most".

I think the default value should be empty, meaning no bell is
suppressed.  Then when users find the bell annoying in some situations
they can add an entry to the option.  This does imply that the name
should be reversed: 'belloff'.  Or perhaps 'shutup' ? :-)

For the implementation, I would pass an argument to vim_beep() to
specify when to not use the bell, then the handling of the option value
only needs to be inside vim_beep().

-- 
hundred-and-one symptoms of being an internet addict:
135. You cut classes or miss work so you can stay home and browse the web.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui