Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyboard shortcut to switch between python console and the editor in pycharm

Tags:

pycharm

In general, I'd like to know the keyboard shortcut for navigating to multiple sections like the project structure, editor, console. I'm using eclipse keymap configuration in pycharm. I used to switch between different views in eclipse using [Ctrl + F7]. But that is not working in pycharm.

I also used to use F12 to bring the focus back to the editor when the focus is on any other view. That is also not working in pycharm.

Environment: Ubuntu 12.04 64bit.

like image 730
livinston Avatar asked Nov 14 '13 06:11

livinston


People also ask

How do I change the Python console in PyCharm?

In the Settings/Preferences dialog ( Ctrl+Alt+S ), select Build, Execution, Deployment | Console | Python Console. Select any available interpreter from the Python interpreter list.

How do I run Python console in PyCharm?

You can assign a shortcut to open Python console: press Ctrl+Alt+S , navigate to Keymap, specify a shortcut for Main menu | Tools | Python or Debug Console. The main reason for using the Python console within PyCharm is to benefit from the main IDE features, such as code completion, code analysis, and quick fixes.

How do I toggle in PyCharm?

Switch between schemesPress Ctrl+` or choose View | Quick Switch Scheme from the main menu. In the popup that opens, select the desired scheme (Color Scheme, Code Style, and so on).


4 Answers

In Pycharm 4, you can specify shortcuts with

File / Settings / Appearance and Behaviour / Keymap

You can create any shortcut you like, and bind it to the command "Python Console" (search for Console), which has no default keymapping. Be aware that it is possible to have multiple consoles open at the same time (for example if you open one in the debugging window) so this may not always behave as you expect it to.

You can toggle back to the last editor window by hitting escape.

like image 168
jafelds Avatar answered Oct 27 '22 17:10

jafelds


If you mean the "Run" window (which has a console in it) you can open it/switch to it with Alt + 4. See the screenshot for the two locations this is indicated.

As mentioned by vape, Esc should return you to your most recently used editor. Alternatively, pressing Alt + 4 again seems to return me to the first editor.

Locations of shortcuts (View Menu and dock bar)

like image 35
Alan Hensley Avatar answered Oct 27 '22 18:10

Alan Hensley


Ctrl + TAB pops up the Switcher dialog. You can then either use repeated Ctrl+Tab to navigate to the window you want, or hit the corresponding number.

like image 26
W.P. McNeill Avatar answered Oct 27 '22 18:10

W.P. McNeill


To switch from Editor to Console: CTRL + SHIFT + TAB
To switch from Console to Editor: SHIFT + ESC

This works for me on Ubuntu 16.04

like image 13
Sanath Sastry Avatar answered Oct 27 '22 17:10

Sanath Sastry