hotkey in datagrip to open a new console - datagrip

What is the hotkey in datagrip to open a new console and what is the hot key to close your current console. I did a google search and came up dry on this one. I would like to be able to do this to speed up my dev time by keeping my hand off the mouse.

From 2021.1 the shortcut is Cmd+Shift+L or Ctrl+Shift+Q

There is no hotkey for that. But you can assign yours!
For NEW CONSOLE:
Press Ctrl(Cmd)+Shift+A: Find action
Type "new console". You will see the action 'Open new console'
Press Alt+Enter to assign a shortcut
Assign it!
For CLOSE ACTIVE EDITOR:
Press Ctrl(Cmd)+Shift+A: Find action
Type "cae". You will see the action 'Close active editor'
Press Alt+Enter to assign a shortcut
Assign it!

Related

Why doesn't NetBeans let me assign a shortcut that involves command+space?

Whenever I try to assign the shortcut by pressing command+space, it doesn't work (like it doesn't detect the space, but leaves me with only command+[nothing]). If I try to assign it via the pop-up menu that appears when you're trying to assign a shortcut and press command, and then click on "command+space", then hit apply, the shortcut is assigned, but it doesn't work. It's as if the NetBeans IDE has something against the use of command+space as a shortcut.

How to define a shortcut key for opening a terminal in Mac OS [duplicate]

One of my primary tools used for programming is my Terminal. It makes my programming process more efficient when I'm able to quickly open a Terminal window.
In Ubuntu, I was using (window+Alt+T) to open Terminal. But now I use a Macbook at my programming job.
Sometimes I use Spotlight to search "Terminal", and press Enter.
I'd like to know if I can assign a keyboard hotkey to do it.
I tested the following procedure under macOS Mojave 10.14.6 (18G3020).
Launch Automator. Create a document of type “Quick Action”:
(In older versions of macOS, use the “Service” template.)
In the new Automator document, add a “Run AppleScript” action. (You can type “run applescript” into the search field at the top of the action list to find it.) Here's the AppleScript to paste into the action:
on run {input, parameters}
tell application "Terminal"
if it is running then
do script ""
end if
activate
end tell
end run
Set the “Workflow receives” popup to “no input”. It should look like this overall:
Save the document with the name “New Terminal”. Then go to the Automator menu (or the app menu in any running application) and open the Services submenu. You should now see the “New Terminal” quick action:
If you click the “New Terminal” menu item, you'll get a dialog box:
Click OK to allow the action to run. You'll see this dialog once in each application that's frontmost when you use the action. In other words, the first time you use the action while Finder is frontmost, you'll see the dialog. And the first time you use the action while Safari is frontmost, you'll see the dialog. And so on.
After you click OK in the dialog, Terminal should open a new window.
To assign a keyboard shortcut to the quick action, choose the “Services Preferences…” item from the Services menu. (Or launch System Preferences, choose the Keyboard pane, then choose the Shortcuts tab, then choose Services from the left-hand list.) Scroll to the bottom of the right-hand list and find the New Terminal service. Click it and you should see an “Add Shortcut” button:
Click the button and press your preferred keyboard shortcut. Then, scratch your head, because (when I tried it) the Add Shortcut button reappears. But click the button again and you should see your shortcut:
Now you should be able to press your keyboard shortcut in most circumstances to get a new terminal window.
As programmers we want the quickest, most fool-proof way to get our tools in order so we can start hacking. Here are how I got it to work in MacOS 10.13.1 (High Sierra):
Option 1: Go to System Preferences | Keyboard | Shortcut | Services.
Under Files and Folders section, enable New Terminal at Folder
and/or New Terminal Tab at Folder and assign a shortcut key to it.
Option 2: If you want the shortcut key to work anywhere, create a new Service using Automator, then go to the Keyboard Shortcut to assign a shortcut key to it. Known limitation: not work from the desktop
Notes:
If the shortcut doesn't work, it might be in conflict with another
key binding (and the OS wouldn't warn you), try something else, e.g.
if ⇧⌥T doesn't work, try ⇧⌘T.
Don't spell-correct MacOS, that's not necessary.
iTerm2 - an alternative to Terminal - has an option to use configurable system-wide hotkey to show/hide (initially set to Alt+Space, disabled by default)
There is a third party app called hotkey app which can launch apps based on the configured shortcuts.
You can install it and setup required shortcut.
https://codenuts.de/en/posts/hotkey/
As others mentioned already, use the keyboard shortcut from services. I also had to restart the computer to take into effect.
mac - "command + t" will open a new terminal window.
Try command + t.
It works for me.

Microsoft Visual Studio Hotkey waiting for another keypress

I'm used to Netbeans and all its shortcuts (e.g. ctrl+e to delete a line), but I'm new to Visual Studio, so I don't like its keypress combinations that much.
When I changed all the hotkeys I need (e.g. alt+shift+up/down to move lines up and down), I also tried to set deleting a line to ctrl+e.
The problem is that when I press ctrl+e now, the IDE waits for me to press another key, because there are hotkeys that go like "ctrl+e followed by ctrl+something".
Do I have to disable all the other hotkeys if I just want to use ctrl+e, or can I tell the IDE something like "when nothing is pressed after ctrl+e for 500ms, then dont wait any longer"?
Thanks in advance.
PS: Microsoft Visual Studio Enterprise 2015
These multi-sequence keystrokes are called chords, and Visual Studio uses them because it has so many commands that there would otherwise be nowhere near enough keyboard shortcuts to invoke them all. And no, you cannot set a timeout value.
You have to disable all of the other keyboard shortcuts that involve Ctrl+E, otherwise the software will have no way of knowing if it should keep waiting for you to press the second part of the chord.
Here's a hint that may make your life easier. When you arrive at the Environment → Keyboard options, don't bother to select anything. Just leave everything at their defaults and click in the "Press shortcut keys" box. Type Ctrl+E. Now, the dialog will give you a list of all the currently-mapped shortcuts that use Ctrl+E.
On my installation, all but one of them are specific to the "Workflow Designer". Only one is used by the "Text Editor"—Edit.ToggleWordWrap, which is mapped to Ctrl+E, Ctrl+W. Since you will only be deleting lines in the text editor, you don't actually need to worry about unmapping all of the shortcuts for the Workflow Designer scope. You can just set up your shortcut as being specific to the text editor. Stepwise:
Remove the keyboard shortcut for Edit.ToggleWordWrap. (You can do this quickly by typing "toggleword" into the "Show command containing" textbox.) Click the "Remove" button.
Now, switch to Edit.LineDelete.
Change the "Use new shortcut in" combobox to "Text Editor".
Click in the "Press shortcut keys" box, and type a good old chordless Ctrl+E.
Click "Assign", and you're done (unless you want to change ToggleWordWrap to something else).

Is there a keyboard shortcut (hotkey) to open Terminal in macOS?

One of my primary tools used for programming is my Terminal. It makes my programming process more efficient when I'm able to quickly open a Terminal window.
In Ubuntu, I was using (window+Alt+T) to open Terminal. But now I use a Macbook at my programming job.
Sometimes I use Spotlight to search "Terminal", and press Enter.
I'd like to know if I can assign a keyboard hotkey to do it.
I tested the following procedure under macOS Mojave 10.14.6 (18G3020).
Launch Automator. Create a document of type “Quick Action”:
(In older versions of macOS, use the “Service” template.)
In the new Automator document, add a “Run AppleScript” action. (You can type “run applescript” into the search field at the top of the action list to find it.) Here's the AppleScript to paste into the action:
on run {input, parameters}
tell application "Terminal"
if it is running then
do script ""
end if
activate
end tell
end run
Set the “Workflow receives” popup to “no input”. It should look like this overall:
Save the document with the name “New Terminal”. Then go to the Automator menu (or the app menu in any running application) and open the Services submenu. You should now see the “New Terminal” quick action:
If you click the “New Terminal” menu item, you'll get a dialog box:
Click OK to allow the action to run. You'll see this dialog once in each application that's frontmost when you use the action. In other words, the first time you use the action while Finder is frontmost, you'll see the dialog. And the first time you use the action while Safari is frontmost, you'll see the dialog. And so on.
After you click OK in the dialog, Terminal should open a new window.
To assign a keyboard shortcut to the quick action, choose the “Services Preferences…” item from the Services menu. (Or launch System Preferences, choose the Keyboard pane, then choose the Shortcuts tab, then choose Services from the left-hand list.) Scroll to the bottom of the right-hand list and find the New Terminal service. Click it and you should see an “Add Shortcut” button:
Click the button and press your preferred keyboard shortcut. Then, scratch your head, because (when I tried it) the Add Shortcut button reappears. But click the button again and you should see your shortcut:
Now you should be able to press your keyboard shortcut in most circumstances to get a new terminal window.
As programmers we want the quickest, most fool-proof way to get our tools in order so we can start hacking. Here are how I got it to work in MacOS 10.13.1 (High Sierra):
Option 1: Go to System Preferences | Keyboard | Shortcut | Services.
Under Files and Folders section, enable New Terminal at Folder
and/or New Terminal Tab at Folder and assign a shortcut key to it.
Option 2: If you want the shortcut key to work anywhere, create a new Service using Automator, then go to the Keyboard Shortcut to assign a shortcut key to it. Known limitation: not work from the desktop
Notes:
If the shortcut doesn't work, it might be in conflict with another
key binding (and the OS wouldn't warn you), try something else, e.g.
if ⇧⌥T doesn't work, try ⇧⌘T.
Don't spell-correct MacOS, that's not necessary.
iTerm2 - an alternative to Terminal - has an option to use configurable system-wide hotkey to show/hide (initially set to Alt+Space, disabled by default)
There is a third party app called hotkey app which can launch apps based on the configured shortcuts.
You can install it and setup required shortcut.
https://codenuts.de/en/posts/hotkey/
As others mentioned already, use the keyboard shortcut from services. I also had to restart the computer to take into effect.
mac - "command + t" will open a new terminal window.
Try command + t.
It works for me.

Xcode 4: Keyboard shortcut for switching Assistant Editor to Tracking (Automatic) mode?

I like using the Assistant Editor in Xcode 4. I frequently Option-Click files to open them in the Assistant Editor, or use Open Quickly (Command-Shift-O), and hold the option key when selecting a file to open it in the Assistant Editor.
Both of these actions switch the Assistant Editor to Manual mode. Is there a keyboard shortcut to switch the Assistant Editor back to Tracking mode (also called Automatic)? In tracking mode it automatically shows the counterpart, e.g. the corresponding header/implementation file for the file in your main editor. know I can select Automatic mode it with the mouse on the Assistant Editor Jump bar, but I really want a keyboard shortcut to do this.
I made this to help answer another question... Does it help?
In the View -> Assistant Editor menu, there's an item called "Reset Editor". The default keyboard shortcut is Cmd-Opt-Shift-Z. It resets the Assistant View to show Counterparts.
I don't know if it's new in Xcode 4.1, but it should be a little easier than AppleScripting.
Alternatively, you could create a behavior to reset the editor how you'd like and bind it to a keyboard shortcut.
You can do it, but not with just a single "standard" keyboard shortcut. Assuming that you have just Option-Clicked on a file and opened it in the Assistant Editor, you would do the following steps to switch to "Counterparts" mode in the Assistant Editor:
If your focus is not on the Assistant Editor, press Command-Option-.
until you are on it.
Once focus is on the Assistant Editor, press Control-4 to drop down
the Assistant Editor menu.
"Manual" will be selected so Press DownArrow once to select
"Counterparts" and press Enter to switch to the counterpart of the
file in the main editor.
If this is too many keystrokes, you can put the keys for steps 2 & 3 in an AppleScript script and bind it to a key.

Resources