Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm terminal shortcuts: switch tab, return to editor, etc. (Mac)

On opening PhpStorm's Terminal Tool Window, I would expect to be able to run commands like Ctrl + Tab to switch terminal tabs, or Cmd + 1 to open the Project Tool Window, but my keyboard is stuck inside the Terminal.

Is there a way to release the keyboard from the Terminal so that I can return to regular commands? (Without using Option + F12 to hide the Terminal Tool Window.)

like image 413
Morgan Delaney Avatar asked Jul 24 '15 20:07

Morgan Delaney


People also ask

How do you switch between tabs in terminal Mac?

In macOS High Sierra (10.13) you can switch to a specific tab using the shortcut keys ⌘ 1 – ⌘ 9 . To enable/disable these shortcut keys, go to Settings > General and toggle Use ⌘-1 through ⌘-9 to switch tabs.

How do I switch between tabs in PhpStorm?

Switch between tabs To move between tabs, press Alt+Right or Alt+Left . You can also switch between recently viewed tabs or files. In the editor, press Ctrl+Tab . Keep pressing Ctrl for the Switcher window to stay open.

How do you quick switch tabs on a Mac?

Shift + ⌘Command and the scroll keys. By pressing this combination of keys and using the scroll keys, we can quickly move between all the tabs that we have open, including those that are Pinned.


2 Answers

  1. Switching between Terminal tabs can be done using the same shortcut as Editor tabs: Alt+Left/Right on Windows using Default keymap (on Mac it would be Cmd + Shift + [ and Cmd + Shift + ] (or whatever you have got there for Main Menu | Window | Editor Tabs | Select Next/Previous Tab -- you can verify/change it in your Preferences | Keymap)).

  2. Project View tool window shortcut (Alt+1 on Windows or Cmd+1 on Mac) does not work indeed if used in Terminal.. but shortcuts for Favorites or Structure tool windows still work just fine.

    Therefore I may suggest to jump to Structure via Alt+7 (Cmd+7 on Mac) first and then just use Esc to get into Editor). P.S. See if recording macro with such sequence will work for you (you can assign custom shortcut to it).

like image 158
LazyOne Avatar answered Oct 17 '22 10:10

LazyOne


I'd suggest simply adding another keyboard shortcut for accessing the terminal. E.g. ⌘0

F12 is the default shortcut for Mac and Linux OS.

This shortcut will toggle terminal focus. The default F12 shortcut for Mac (dunno about Windows) will not.

You may need to restart PhpStorm to hijack ⌘0 or whatever you choose.

like image 3
originalbryan Avatar answered Oct 17 '22 10:10

originalbryan