Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to jump from Intellij terminal to editor with shortcut

I know that you can jump from almost all windows in Intellij IDEA to the editor window with Esc. In Intellij's terminal window, this does not work. Does anyone know how to do this with a keyboard shortcut? This would be nice since I can jump from my editor to the terminal with Alt+F12 but I cannot do it the other way without using my mouse.

like image 647
pogopaule Avatar asked Jan 15 '14 10:01

pogopaule


People also ask

How do I exit terminal in IntelliJ?

You can run a process with ⌃R (macOS), or Shift+F10 (Windows/Linux). To stop a process, you can use ⌘F2 on macOS, or Ctrl+F2 on Windows/Linux.

How do I use jump function in IntelliJ?

To jump to the next or previous found issue in your code, press F2 or Shift+F2 respectively. Alternatively, from the main menu, select Navigate | Next / Previous Highlighted Error. IntelliJ IDEA places the caret immediately before the code issue.

What is Ctrl shift O in IntelliJ?

In Eclipse, you press CTRL + SHIFT + O “Organize Imports” to import packages automatically. For IntelliJ IDEA, if you press CTRL + ALT + O “Optimize Imports”, it just removes some unused imports, never imports any package.

What is Ctrl h in IntelliJ?

Ctrl + H = "Type Hierarchy" view = shows a tree of parent and child classes of this class. Ctrl + Shift + A = "It does a search as you type through all the commands in intellij. Not only that but when you find the command you want it also displays the corresponding shortcut key next to it!"


2 Answers

UPDATE - March 2016

Since this question is getting some attention, I wanted to remind everyone that you can toggle between the editor and the terminal window easily enough with a built in action. By default it is mapped to Alt+F12 and F12. To check other mappings, view it in the menu at View > Tool Windows > Terminal. Alternatively go to the Working with Embedded Local Terminal web help page and change the Keymap option in the upper right corner and scroll to the very end (just above the "See also" section) where it says: "Toggle between the embedded local terminal and editor by pressing...". You can remap this action in Settings > Keymap > Other > Terminal

The main "issue" this question discusses is if there is a way to return from the terminal window to the editor without closing the terminal window.

[End March 2016 update]

===================================================

Some options I can think of at the moment.

  1. Alt+F12 a second time will take you back to the editor, but will hide the terminal window.
  2. Alt+Home will take you to the navigation bar, then hitting Esc will take you to the editor. If you do this often enough, to eliminate the need for the double sequence you could record a Macro (Edit > Macros) with the sequence. Then map it to a shortcut (Settings > [IDE Settings] > Keymap > Macros). The nice thing about this option is that it will work from any tool window. So you can get use to it as a consistent "Return to the Editor" shortcut.
  3. While there is no editor option in the Ctrl+Tab switcher that @vikingsteve mentions, you could do Ctrl+Tab, Ctrl+Shift+Tab. Again, you could record that to a macro.

If I think of any other ideas, I'll add them.

like image 189
Javaru Avatar answered Oct 13 '22 15:10

Javaru


Ubuntu:

alt + 2(twice) - jump from the terminal to the editor alt + F12 - open the terminal  

Mac:

cmd + 2(twice) - jump from the terminal to the editor options + F12 (this shortcut toggles the terminal window on and off) 
like image 35
Andrew Avatar answered Oct 13 '22 14:10

Andrew