In PyCharm, how to go back to last location?

元气小坏坏 提交于 2019-11-29 21:12:22

Under ArchLinux with PyCharm CE 3.1 works the combination Ctrl + Alt + Left.

This is the way I find out the combination:

  1. (Right click) Go To -> Implementation(s)
  2. Double Shift -> Back

  3. There is an option Back in the section Actions
  4. Ctrl + Shift + A

  5. And then the cursor comes back
Berry Tsakala

All in all, it has nothing with PyCharm;

In my case, there was a global key combo of another program, that masked Ctrl-Alt-Left

I solve it by remapping "file > settings > keymap > main menu > navigate > back".

I chose Alt+Left, which intuitively feels likes web browsers "back" behavior.

In mac OS X (atleast in El Capitan) it is cmd + [ to go back to the previous location.

David Parks

Update for year 2016 & 2017:

In PyCharm 2016 & 2017 on windows the correct default is Ctrl+Shift+Backspace

https://www.jetbrains.com/help/pycharm/2016.2/navigating-to-next-previous-change.html

Be warned that Ctrl+Alt+Left will rotate your entire screen on Windows 10. If you're reading this from a horizontal posture, Ctrl+Alt+Up will get you back vertical!

Niklas Rosencrantz

Alt + Shift + left

The above works with PyCharm 2016.3.2 if you select the keymap "default for GNOME".

PyCharm 2019.1+

This version of PyCharm has a new functionality called Recent Locations. This is useful when you find yourself needing to move back and forth between different locations in the code.

You can use the Recent Locations popup (Ctrl+Shift+E, or ++E on macOS) to get you to your destination quicker.

On macOS (Sierra; 10.12.6) and PyCharm 2017.3.1 (Professional Edition; built on December 13, 2017), if you're using the Go To -> Declaration (⌘+B), you can jump back and forth using ⌘+⌥+◀ or ▶.

Search for Back in the Settings ‒> Keymap, click on it and change it for what you want ‒ should help on all systems.

I use Ubuntu so the default was Ctrl + Alt + Left, but this combination is already in use by the system.

JAugust

I found the solutions don't go with mac. But I found that Shift + Command + Return takes you to location that you were working with.

To further explain, if you have pressed Command + Mouse click to navigate to a function, pressing the above combination takes to directly to the call.

mapcuk

In Ubuntu Ctrl+Alt+Left is overridden in for switching to left workspace. I don't use workspaces at all so I cancelled that shortcut in System Settings -> Keyboard -> Shortcuts -> Navigation -> Switch to workspace left.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!