TextMate map key for next complete to command + spacebar - keyboard-shortcuts

I found a lot of tutorials and forum questions around remapping key bindings in Textmate and for the most part I know what needs to be done as far as copy the KeyBindings file and then make the changes needed. More on what I am talking about here http://blog.macromates.com/2005/key-bindings-for-switchers/
I am interested in re-mapping the esc key for nextComplete to control + spacebar. The problem is I am having a hard time finding what the code is for the spacebar or if this is even supported.
I mainly do actionscript development in eclipes and code hinting dialogue is triggered by this key combo and I would like to have the same in Textmate. Hitting the esc key kind of sux. I thought I would get used to it but the fact is that it just kills the flow of typing the rest of your code.
I could use some help figuring out what he code is for the space bar. I know control key is the ^ symbol. I tested this by changing the keybinding to ^s and it remapped just fine.

I think this one can be done with the OS X gui:
System Preferences, Keyboard, Click Keyboard Shortcuts Tab
Click the little Plus, and choose Application: Textmate.app, Menu Title: Next Completion, Type Command Space (or Control Space) and click Add and that should work. You might want to remove conflicting shortcuts - possibly spotlight?
For future reference, I used Key Codes to find the key for space is: \UF20

Related

Intellij outputs wierd characters for keys that are should not output anything

Intellij keeps making my life difficult. I decided to go to the bottom with it today and create a new keyboard mapping for mac using the program ukulele.
By default, Mac will output all kinds of weird characters when you hold down the option key. Now, since I never use any of those, I prefer to use them for shortcuts and using ukelele you can create a new keyboard layout. The program works fine. It is good.
Now, shortcuts are not filled on the keyboard, and in the learning phase, you will try some that are not working, or assigned.
When this happens, Intellij outputs weird characters instead. Characters such as for instance for the combo option + r. Same for e, t and so on.
This does not occur in chrome, the terminal, TextEdit or any other program.
Intellij seems to realize the combo does not result in anything and decides to put out the same character for all those keys.
As you see in the picture below from the macOS build-in keyboard viewer, the keys are not mapped (option being held down) at all.
Note, that only Intellij so far outputs these characters.

Atom keyboard shortcut to change window focus not working

I have the following keymap.cson file to config my Atom editor:
'body':
'ctrl-shift-cmd-left': 'window:focus-pane-on-left'
Only when I run this command, the current text is selected. Which without the alt key held, would make sense as a highlighting command.
However, is I bind a key command which I think most likely doesn't have a competing action, say alt-cmd-;, it seems to be registered into the list of key commands in Settings/Keybindings, yet again no window focus is happening.
Edit:
I now realize that pane and not window may be the relevant term for what I want. Still, searching the Key Bindings for pane focus switching didn't yield anything obvious. Surely, there must be a simple way to select through files in the Project area while editing.
Although this answer doesn't match the title of the question, based on your edit I think that tree-view:toggle-focus is what you're looking for.
Please try using Ctrl + 0.
And, if you use Nuclide (related to React), please try disabling it to check the difference.

PhpStorm: Disabling autofill on Find

A few versions ago, PhpStorm (and I assume WebStorm) added a new feature: Pressing CTRL+F (Find) while having text highlighted, automatically puts that text in the search bar:
Unfortunately, after decades of habit, I automatically press CTRL+C, CTRL+F, CTRL+V and invariably end up with this:
Before anyone suggests I simply adapt and change, I'd like to point out that no other application I use behaves this way, and I don't want to develop a habit that will only cause me pain in other applications.
How can I disable this "helpful" feature in PhpStorm?

How to get emacs-like keybindings in Pharo?

I've downloaded Pharo today, and I noticed most keybindings don't work within the language environment.
Is there any possible way to get standard Mac / Linux keybindings to work?
I could find no answer searching on Google.
I'd appreciate if someone could tell me how to configure the standard
Ctrl+a, BeginningOfLine
Ctrl+e, EndOfLine
Ctrl+d, forwardDelete
Ctrl+f, forwardChar
Ctrl+b, backwardChar
Ctrl+n, nextLine
Ctrl+p, previousLine
to work on Pharo 5.0.
If by "standard" you mean "emacs-like keybindings" then no, Pharo does not support such scheme nor is there an easy way to change them.
You could change some of the hard-coded shortcuts in places like the PharoShortcuts and RubSmalltalkEditor class>>buildShortcutsOn: (which powers the Playground).
However there are very likely more places (e.g. Nautilus).
Several of the shortcuts you mentioned are also core shortcuts for Pharo (in the sense that you can execute them pretty much anywhere you can type text), namely:
ctrl+p for printing the selection
ctrl+d for doing (executing) the selection
ctrl+n browsing senders of the highlighted selector
Furthermore ctrl+a is "select all" as in pretty much every text editor, and ctrl+f find.
However, there is an ongoing effort to cleanup the shortcuts and unify them into single place (PharoShortcuts), so in time such change should easily be possible.
To get the basic emacs-style cursor navigation on my Mac, I punted with BetterTouchTool to send Pharo keys, like this:
ctrl+a --> fn + left-arrow Beginning of line
ctrl+e --> fn + right-arrow End of line
ctrl+p --> up-arrow Previous line
ctrl+n --> down-arrow Next line
ctrl+f --> right-arrow Forward character
ctrl+b --> left arrow Backward character
ctrl+v --> fn + down-arrow Next page (behavior is inconsistent)
option+v --> fn + up-arrow Previous page (also inconsistent)
It's not ideal, but a big step in the right direction. BetterTouchTool is awesomeness that any Mac power user should seriously consider anyway.
For the benefit of non-Mac users, there is no collision with Pharo core shortcut keys in this scheme, because on the Mac the Command key is used in place of Ctrl for Pharo core shortcuts.

Keyboard shortcut to Un/Comment out code in Mathematica 7?

A keyboard shortcut to comment/uncomment out a piece of code is common in other programming IDE's for languages like Java, .Net. I find it a very useful technique when experimenting through trial and error to temporarily comment out and uncomment lines, words and parts of the code to find out what is and isn't working.
I cannot find any such keyboard shortcut on the Mathematica front end in version 7. I know that it is possible to comment out code by selecting the code, right mouse click and select Un/Comment from the menu that appears but this is too slow while coding.
I tried to access this using the menu key Menu on the keyboard but Mathematica frontend doesn't respond to or recognise this key unlike other applications, this could have allowed a key combination for commenting. Can someone else verify that this isn't unique to my machine and that the key isn't recognised by mathematica. I looked at this question and looked in the KeyEventTranslations.tr file but I don't think there is any way to create a shortcut to do this(?). Should I just live with it?
Any other suggestions?
(I have seen there is an Emacs version of mathematica, I have never tried Emacs or this Mma version and imagine that it would have this ability but would prefer not to go to the trouble and uncertainty of installing it. Also I would guess that the Wolfram Workbench could do this, but that may not be worth the investment just for this.)
You can install the shortcut in Mathematica 7.0.x if you are willing to edit the Mathematica system file MenuSetup.tr. You can find it in the same location as the KeyEventTranslations.tr file (i.e. in the installation under "SystemFiles/FrontEnd/TextResources/platform"). In MenuSetup.tr, locate the following line under the definition of the Edit menu:
MenuItem["Check &Balance", "Balance", MenuKey["B", Modifiers->{"Control", "Shift"}]],
Immediately below that line, insert the following:
MenuItem["Un/C&omment Selection", KernelExecute[FE`toggleComment[]], MenuKey["/", Modifiers->{"Command"}], MenuEvaluator -> Automatic, Method -> "Queued"],
The Un/Comment Selection command is now available under the Edit menu, with the keyboard shortcut Cmd-/ or Alt-/ depending on your platform -- just like in Mathematica 8 where this command comes pre-installed.
Please take as read the usual disclaimers about hacking the Mathematica installation files -- no warranty is offered :)
I do not know of any way to map this function to some shortcut involving the Menu key.
Shortcut Key, No Menu
The preceding steps mimic what Mathematica 8 does by installing a new menu item. If you prefer to leave the menus unchanged, then you can install the shortcut in KeyEventTranslations.tr instead. Add the following line:
Item[KeyEvent["/", Modifiers->{Command}], KernelExecute[ToExpression["FE`toggleComment[]"]], MenuEvaluator -> Automatic, Method -> "Queued"]
You'll need a comma on the end of that line if it is not the last item in the list.
Select the code and press one of the following:
Alt+/
Alt-E-O
Alt+E+O
Notes:
Tested only on Windows, using Mathematica 8.
On my non-US keyboard (ABNT Brazil), the shortcut Alt+/ doesn't work, instead I use Alt+E+O.
Here is code for your KeyEventTranslations.tr file that will comment out code. I am still working on the other half.
Item[KeyEvent["/", Modifiers -> {Command}],
FrontEndExecute[{
NotebookApply[FrontEnd`InputNotebook[],
"(*\[SelectionPlaceholder]*)"
]
}]
],
This binds it to Alt+/ as it is in Mathematica 8.