How to jump from Intellij terminal to editor with

2019-01-21 09:00发布

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.

11条回答
在下西门庆
2楼-- · 2019-01-21 09:00
  • This will active the editor again

  • Alt + 1 then Esc

查看更多
Root(大扎)
3楼-- · 2019-01-21 09:03

Injellij -> Preference -> Key Map -> search "terminal" -> .

find or change the shortcut there

查看更多
贪生不怕死
4楼-- · 2019-01-21 09:07

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)
查看更多
The star\"
5楼-- · 2019-01-21 09:08

I believe the better answer is

Alt + Home

This is because most of the answers like Alt + F12 are about closing the terminal and hoping the focus goes back to the editor, but with Alt+Home the focus goes to selecting the editor and sometimes the focus is on the file but it actually is not opened. This way you can open it too.

查看更多
Fickle 薄情
6楼-- · 2019-01-21 09:10

Another possibility:

Shift + Esc

(This one will close terminal panel)

查看更多
叛逆
7楼-- · 2019-01-21 09:13

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.

查看更多
登录 后发表回答