How do I completely disable bell in screen (both visual and audio) - linux

In screen, is there a way to completely disable bell ?
I know you can switch to audio bell instead of the visual one and have already done that and have also specified no bell in putty so I don't hear anything but whenever there is a bell in one window, I see an annoying popup on the other windows say "bell in window 1" and so on.
Any idea on how to get rid of it ?

To permanently disable the visual bell, you need to add the following command to your .screenrc file:
vbell off
I haven't tested it, but adding the additional line to your .screenrc file should disable the message bell:
bell_msg ""
To disable it in a session (temporarily, not permanently), issue the following command from the session:
CTRL+A, CTRL+G
See the man page for screen (section 'CUSTOMIZATION') for more information.

Related

Mouse scrolling in vim scrolls terminal window

I am just getting started using Vim and came across :set mouse=a which I've found really useful for navigating a file, however for some reason when I try and scroll now it scrolls the whole terminal window and not just the vim window.
Then I scroll up and can see the terminal outside Vim
Any ideas on how to fix this? I've tried resetting mouse= and exiting and re entering vim.
The problem was that I had accidentally disabled Allow Mouse Reporting in error.
Checking Menu > View > Allow Mouse Reporting or Cmd + R has fixed it!
I think the cheap answer to your question is that you should be navigating through files in vim using motion commands, Ctrl + d, etc. It might seem slow at first, but it really becomes more natural down the line.
That said, if you are on Mac and using Terminal, you might need to hold the Fn to temporarily disable mouse support. (Check this out for reference: OS X Terminal Mouse Support
Also, you can always try MacVim, which supports mouse scrolling out of the box.
If neither of those solutions work for you, some more information would be helpful for troubleshooting, e.g., your operating system, recent changes to your vimrc, etc.

Disabling mouse support on ideavim

Is there a way to disable mouse support in file edition on ideavim? It is really annoying that it enters into visual mode each time I click.
It isn't possible to have the same behavior as vim without mouse in terminal, but can I have it on pycharm's ideavim?
I also hate when the editor suddently goes into visual mode when I accidentally drag with the mouse. I ended up modifying the ideavim source and compiled my own version. I got the idea from another answer https://stackoverflow.com/a/24256022/598781
I just return immediately in the EditorMouseHandler.mouseDragged method. i.e. changed line 1772 in the file ideavim/src/com/maddyhome/idea/vim/group/MotionGroup.java to:
if (true || !VimPlugin.isEnabled()) return;
This change could have some consequences, but I don't use mouse select anyway.
It's not possible to disable mouse support in Vim emulation. Note however that IdeaVim switches to Visual selection mode only when you're selecting text with the mouse. Simple clicks shouldn't make IdeaVim enter visual selection mode.
You should try :set selectmode=mouse,ideaselection. It is a workaround but that worked for me.
https://github.com/JetBrains/ideavim/blob/master/doc/set-commands.md

Recall previous command in the RubyMine console

In the RubyMine consoles, like the one that appears in RubyMine 7 while debugging, how do you recall the previous command or line you typed? Something similar to pressing the up arrow in a conventional terminal or console.
The history of commands can be accessed similar to any conventional terminal or console :- using the up and down arrows to scroll through the history.
The commands history size limit can be specified in : File|Settings|Editor - "Console commands history size"
Scrolling through console history with the up key in any command line environment can be pretty tedious. option-command-E, can show you your entire commands history.
Looking into RubyMine 7.0 Doc
https://www.jetbrains.com/ruby/webhelp/using-consoles.html
In an interactive console, you can:
Type commands in the lower pane of the console, and press Enter to
execute them.
Results are displayed in the upper pane. Use basic code completion
Ctrl+Space.
Use Up and Down arrow keys to scroll through the history of
commands, and execute the required ones.
Load source code fom the editor into console.
Use context menu of the upper pane to copy all output to the
clipboard, compare with the current contents of the clipboard, or
remove all output from the console.
Use the toolbar buttons to control your session in the console.
Configure color scheme of the console to meet your preferences.
Refer to the section Configuring Color Scheme for Consoles for
details.

Screen configuration in Linux

What do the following configurations in Linux Screen mean?
1. caption string "%w"
2. caption always
3. activity "#check %n"
4. defmonitor on
5. vbellwait 0
6. vbell_msg "whoops"
7. vbell off
8. defscrollback 3000
And where do I learn or have a screen tutorial?
In the usual place:
$ man screen
The official documentation is usually the first to be read and the best.
Tutorials are easy to find. Have you tried to enter the term "gnu screen tutorial" in a search engine? Here is one, for a start.
All of the items on your list are found in the man pages for screen.
caption string "%w"
caption always
This command controls the display of the window captions. Normally a caption is only used if more than one window is shown on the display (split screen mode). But if the type is set to always screen shows a caption even if only one window is displayed. The default is splitonly.
The second form changes the text used for the caption. You can use all escapes from the "STRING ESCAPES" chapter. Screen uses a default of '%3n %t'.
You can mix both forms by providing a string as an additional argument.
activity "#check %n"
When any activity occurs in a background window that is being monitored, screen displays a notification in the message line. The notification message can be re-defined by means of the "activity" command. Each occurrence of '%' in message is replaced by the number of the window in which activity has occurred, and each occurrence of '^G' is replaced by the definition for bell in your termcap (usually an audible bell). The default message is
'Activity in window %n'
Note that monitoring is off for all windows by default, but can be altered by use of the "monitor" command (C-a M).
defmonitor on
Same as the monitor command except that the default setting for new windows is changed. Initial setting is 'off'.
vbellwait 0
Define a delay in seconds after each display of screen's visual bell message. The default is 1 second.
vbell_msg "whoops"
Sets the visual bell message. message is printed to the status line if the window receives a bell character (^G), vbell is set to "on", but the terminal does not support a visual bell. The default message is "Wuff, Wuff!!". Without parameter, the current message is shown.
vbell off
Sets the visual bell setting for this window. Omitting the parameter toggles the setting. If vbell is switched on, but your terminal does not support a visual bell, a 'vbell-message' is displayed in the status line when the bell character (^G) is received. Visual bell support of a terminal is defined by the termcap variable 'vb' (terminfo: 'flash').
Per default, vbell is off, thus the audible bell is used. See also 'bell_msg'.
defscrollback 3000
Same as the scrollback command except that the default setting for new windows is changed. Initial setting is 100.

GNU Screen refresh problem

I've recently started using GNU Screen but have run into a very annoying problem.
In any screen window if I press the left arrow key or backspace when there is nothing typed at the prompt the screen seems to refresh, causing a slight flicker. After typing some text at the prompt using the backspace or left arrow won't cause the flicker (at least until the first character in the prompt is reached).
Anyone seen this before?
That's not a problem. It's a feature. It's supposed to behave like that when "visual bell" is enabled in your terminal. Which it is, by default I guess.
Take a look at this document. There are three properties in the file that relates to visual bell. You can change that in ~/.screenrc
vbell_msg "bell: window ~%" # Message for visual bell
vbellwait 2 # Seconds to pause the screen for visual bell
vbell off # Turns visual bell off
Try setting vbell property to off.
Also, I would recommend you ask the same question in ServerFault. I am sure you'll get way better answers over there. To access the site, since it's in private beta, check this blog entry.

Resources