[comp.editors] Silence, my child

wb8foz@mthvax.cs.miami.edu (David Lesher) (12/27/89)

OK, all you gurus, having gotten nice presents for the holidays,
here is your chance to prove your mettle.

I want to silence vi. I know it wants to be friendly, and let me
know it loves attention by BEEPing every time I feed it an extra <ESC>
cookie, but I don't want it to. I just want it to munch them
silently. I presently filter them out in the terminal hardware,
but then I can't get other BEEPs from the system.

My first thought was to somehow pipe tty output through tr or
such, and turn tr on when entering vi, and off when exiting. The
local guru said: Sorry Charlie, to that idea.

So Lords of the Flies^H^H^H^H Net, how CAN I do this?
(This is a Ultricks machine--patching the vi itself is ng, others
like it as it is)
--
A host is a host & from coast to coast...wb8foz@mthvax.cs.miami.edu 
no one will talk to a host that's close..............(305) 255-RTFM
Unless the host (that isn't close)......................pob 570-335
is busy, hung or dead....................................33257-0335

filbo@gorn.santa-cruz.ca.us (Bela Lubkin) (12/27/89)

In article <1357@umigw.MIAMI.EDU> David Lesher writes:
>I want to silence vi. I know it wants to be friendly, and let me
>know it loves attention by BEEPing every time I feed it an extra <ESC>
>cookie, but I don't want it to. I just want it to munch them
>silently. I presently filter them out in the terminal hardware,
>but then I can't get other BEEPs from the system.

This may or may not be specific to the versions of vi and termcap I've
used (Xenix (Sys V.3) on PClones and BSD 4.2/4.3 on ISI machines), but
these versions have a termcap capability for 'visual bell'.  vi uses the
visual bell if it is available; few, if any, other programs seem to use
it.  You can do as I have done, and actually specify a visual bell in
your termcap; or specify a do-nothing sequence for it.  My visual bell
sequence for a VT102 is "ESC [ ?5h ESC [ ?5l", or

  :vb=\E[?5h\E,\E[?5l:

in termcap-speak.  I don't know how to make an empty termcap capability,
but a fair do-nothing sequence is "ESC [ C ^H" (cursor forward, cursor
back),

  :vb=\E[C^H:

In the likely event that you're not using a VT[12]xx terminal, you'll
have to roll your own.  Likewise if your system uses terminfo.

BTW, here are the termcap entries I use; they perform significantly
better for me than the default entries shipped with Xenix, ISI BSD, and
SunOS 3.5, in both speed and reliability:

HK|vt102H|HandShake|Amiga HandShake VT102 emulator:\
  :li#24:co#80:cm=\E[%i%d;%dH:ho=\E[H:ll=\E[24H:up=\E[A:UP=\E[%dA:do=^J:\
  :DO=\E[%dB:le=^H:LE=\E[%dD:nd=\E[C:RI=\E[%dC:sc=\E7:rc=\E8:ce=\E[K:cd=\E[J:\
  :cl=\E[H\E[J:im=\E[4h:ei=\E[4l:mi:al=\E[L:AL=\E[%dL:dm=:ed=:dc=\E[P:\
  :DC=\E[%dP:dl=\E[M:DL=\E[%dM:sf=\ED:sr=\EM:sb=\EM:cs=\E[%i%d;%dr:mb=\E[5m:\
  :md=\E[1m:mr=\E[7m:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:me=\E[m:ms:\
  :vb=\E[?5h\E,\E[?5l:as=\E(0:ae=\E(1:ks=\E[?1h\E=:ke=\E[?1l\E>:vt#3:\
  :is=^O\E[1;24r\E[24;1H:rf=/usr/lib/tabset/vt100:\
  :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:pt:bs:am:xn:xo:kb=^H:kd=\EOB:kl=\EOD:\
  :kr=\EOC:ku=\EOA:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:
HS|vt102Hs|HandShake-s|Amiga HandShake VT102 emulator w/sysline:\
  :li#23:ll=\E[23H:cl=\E[23;80H\E[1J\E[H:hs:es:ts=\E7\E[24;%dH:fs=\E8:\
  :ds=\E7\E[24H\E[2K\E8:is=^O\E[1;23r\E[23;1H:tc=HandShake:

These have been tested successfully with Amiga HandShake 2.12a and MS-DOS
ProComm Plus 1.1b; they >should< work with real live VT102's, but I
won't make any claims.

Bela Lubkin    * *    //  filbo@gorn.santa-cruz.ca.us  CI$: 73047,1112 (slow)
     @       * *     //  belal@sco.com  ..ucbvax!ucscc!{gorn!filbo,sco!belal}
R Pentomino    *   \X/  Filbo @ Pyrzqxgl +408-476-4633 and XBBS +408-476-4945

mercer@ncrcce.StPaul.NCR.COM (Dan Mercer) (12/28/89)

In article <118.filbo@gorn.santa-cruz.ca.us> filbo@gorn.santa-cruz.ca.us (Bela Lubkin) writes:
:In article <1357@umigw.MIAMI.EDU> David Lesher writes:
:>I want to silence vi. I know it wants to be friendly, and let me
:>know it loves attention by BEEPing every time I feed it an extra <ESC>
:>cookie, but I don't want it to. I just want it to munch them
:>silently. I presently filter them out in the terminal hardware,
:>but then I can't get other BEEPs from the system.
:
:This may or may not be specific to the versions of vi and termcap I've
:used (Xenix (Sys V.3) on PClones and BSD 4.2/4.3 on ISI machines), but
:these versions have a termcap capability for 'visual bell'.  vi uses the
:visual bell if it is available; few, if any, other programs seem to use
:it.  You can do as I have done, and actually specify a visual bell in
:your termcap; or specify a do-nothing sequence for it.  My visual bell
:sequence for a VT102 is "ESC [ ?5h ESC [ ?5l", or
:
:  :vb=\E[?5h\E,\E[?5l:
:
:in termcap-speak.  I don't know how to make an empty termcap capability,
:but a fair do-nothing sequence is "ESC [ C ^H" (cursor forward, cursor
:back),
:
:  :vb=\E[C^H:
:
:In the likely event that you're not using a VT[12]xx terminal, you'll
:have to roll your own.  Likewise if your system uses terminfo.
:
:BTW, here are the termcap entries I use; they perform significantly
:better for me than the default entries shipped with Xenix, ISI BSD, and
:SunOS 3.5, in both speed and reliability:
:
:HK|vt102H|HandShake|Amiga HandShake VT102 emulator:\
:  :li#24:co#80:cm=\E[%i%d;%dH:ho=\E[H:ll=\E[24H:up=\E[A:UP=\E[%dA:do=^J:\
:  :DO=\E[%dB:le=^H:LE=\E[%dD:nd=\E[C:RI=\E[%dC:sc=\E7:rc=\E8:ce=\E[K:cd=\E[J:\
:  :cl=\E[H\E[J:im=\E[4h:ei=\E[4l:mi:al=\E[L:AL=\E[%dL:dm=:ed=:dc=\E[P:\
:  :DC=\E[%dP:dl=\E[M:DL=\E[%dM:sf=\ED:sr=\EM:sb=\EM:cs=\E[%i%d;%dr:mb=\E[5m:\
:  :md=\E[1m:mr=\E[7m:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:me=\E[m:ms:\
:  :vb=\E[?5h\E,\E[?5l:as=\E(0:ae=\E(1:ks=\E[?1h\E=:ke=\E[?1l\E>:vt#3:\
:  :is=^O\E[1;24r\E[24;1H:rf=/usr/lib/tabset/vt100:\
:  :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:pt:bs:am:xn:xo:kb=^H:kd=\EOB:kl=\EOD:\
:  :kr=\EOC:ku=\EOA:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:
:HS|vt102Hs|HandShake-s|Amiga HandShake VT102 emulator w/sysline:\
:  :li#23:ll=\E[23H:cl=\E[23;80H\E[1J\E[H:hs:es:ts=\E7\E[24;%dH:fs=\E8:\
:  :ds=\E7\E[24H\E[2K\E8:is=^O\E[1;23r\E[23;1H:tc=HandShake:
:
:These have been tested successfully with Amiga HandShake 2.12a and MS-DOS
:ProComm Plus 1.1b; they >should< work with real live VT102's, but I
:won't make any claims.
:
:Bela Lubkin    * *    //  filbo@gorn.santa-cruz.ca.us  CI$: 73047,1112 (slow)
:     @       * *     //  belal@sco.com  ..ucbvax!ucscc!{gorn!filbo,sco!belal}
:R Pentomino    *   \X/  Filbo @ Pyrzqxgl +408-476-4633 and XBBS +408-476-4945

In terminfo,  the capname is flash.  You can set it up to just output
nulls
		flash=$<5>,



-- 

Dan Mercer
Reply-To: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer)

mike@umn-cs.CS.UMN.EDU (Mike Haertel) (01/03/90)

I turned the beep off (in vi and everything else just about) by
adding the capability :vb=^@: to my termcap entry.
-- 
Mike Haertel <mike@ai.mit.edu>
"Of course, we have to keep in mind that this year's Killer Micro
 is next year's Lawn Sprinkler Controller . . ." -- Eugene Brooks