Can I assign multiple bindings to a MonoDevelop command? - monodevelop

I'm using MonoDevelop-Unity 4.0.1, can I assign to it multiple keybindings to a single command?
In case it matters:
the command would be Toggle All Folds
the OS is OSX 10.8

Related

Move caret to start line in PhpStorm built in terminal

I would like to know a shortcut to go to start line in PhpStorm built in terminal. How do I achieve that?
The built-in terminal is just an inline version of your actual system terminal. So it depends on which Operating System you are using, but the defaults should be:
On Windows and Linux machines, press the "Home" button.
On OS X, press CTRL+A.

How to use the left and right arrow keys in the tclsh interactive shell (Ubuntu 14.04)?

Why can't I use the left and right arrow keys (actually, the same goes for the up and down keys as well) to move about the line I'm currently on in the tclsh interactive shell? If I try to press either one, I get a bunch of abracadabra instead of moving back and forth. This is not all that convenient when, for example, you make a typo, but you can't move the cursor back to change it. You have to use the backspace key to erase all the stuff that you've typed after the place where the typo is located thereby destroying all your work. Is it possible to fix this, quite frankly, buggy behaviour?
The behaviour isn't buggy. It is inconvenient yes.
To get editing in a shell, usually the GNU readline library is used. If a program doesn't use that library, you don't have that feature.
For tclsh there are licensing reasons (GPL vs. BSD style Tcl license), which make it inconvenient to add readline support directly to tclsh for all those platforms where readline is not part of the operating system (nearly everything but Linux).
You can use the Ubuntu rlwrap package to still get the editing you want.
Install rlwrap:
sudo apt-get install rlwrap
And use it to run tclsh with command line editing:
rlwrap -c tclsh
Another option would be to use the Tk based shell tkcon, which provides a bit more options as a Tcl shell, its available as a ubuntu package too.
Expanding my own answer: You can also build and use tclreadline, as a package in your .tclshrc.
You can use the the generic rlwrap as suggested by schlenk, or you can use tclreadline:
Install tclreadline (e.g. with the following command for debian/ubuntu):
sudo apt install tclreadline
Automatically load it by adding it to your ~/.tclshrc:
if {$tcl_interactive} {
package require tclreadline
::tclreadline::Loop
}
Using tclreadline does not only provide the basic editing features but also includes tab completion, which rlwrap can't do due to it's generic nature.

How to get command line history in tkcon using the arrow keys?

In Tkcon the way to access command line history is through the menu and you cannot access it with the up/down arrow keys. For tclsh there are a few readline libraries that add these capabilities, but those do not work in Tkcon.
I am running an Arch Linux system and Tkcon is version 2.5.
UPDATING TO VERSION 2.7 resolved the problem. For version 2.5 I found a patch here.

Sublime Text 2 build command ignores the shebang

The Sublime text 2.0.1 (Mac OSX) build command ignores the shebang line a the top of my python file.
The shebang line has the full path to my python 3.2 installation :
#!/usr/local/bin/python3
However the python version being used is always 2.7.2. I'm maintaining code for both 2.7 and 3.2 and so must rely on the shebang line to be used.
Is there a way to configure the Sublime text 2 build system to look at the shebang?
Sublime does not use the shebang to determine the execution, it uses your build rule. You could customize the Python build rule to add variants for python2 and python3.
Official instructions for adding build variants.
Simplified example of build variants from another SO question.
Note that with build variants, the default is run by Command+B (Mac) or Control+B (Windows and Linux). The second variant can be run Command+Shift+B (Mac) or Control+Shift+B (Windows and Linux).
Have a look at Sublime Text Shebang plugin.
It adds a few commands that allow to run scripts, based on the shebang line, but the output will be placed on a new buffer, not in the console.

Mysql on the command line (can't use all keyboard buttons)

Using mysql directly from the command line (running on Ubuntu 9.10, standard bash terminal), I am unable to use certain keyboard buttons like:
Delete, Control-(arrow right), Control-(arrow left)
Which gets returned to me as:
~;5C;5D
respectively. I'm assuming there must be a flag in mysql that fixes this but I have been unable to find one. Is there a .mysqlconfig file to edit to make this happen on startup?
According to this thread and mysql --version, mysql is compiled with editline instead of readline. From that thread:
I had to add create an .editrc file with the following lines to get ctrl-R and DELETE to work.
bind "\e[3~" ed-delete-next-char
bind "^R" em-inc-search-prev
Although that didn't work for me.
Another suggestion from that thread did work:
$ sudo apt-get install rlwrap
Then add an alias in ~/.bashrc
alias mysql='rlwrap -a mysql'
This problem may be specific to Ubuntu 9.10