I like to jump around code a lot with the keyboard but I am hitting a wall of usability in Spyder IDE. I can use the "goto definition" feature to jump to the definition of some function but then I can't go back to where my cursor was (so it takes a while to manually find where I was before because there might be many lines of code).
So for example there is a constant X=5
in the same file and when I use "goto definition" I can see what that constant is but then there is no way to go back. Or another example is a function from another file where "goto definition" takes me to that other file... but now I can't find the other file I was on (because there may be many files open).
In the 30+ year old vi
you can goto the definition and return with ctrl-] and ctrl-t. In the 14+ year old Eclipse the equivalent to "goto definition" would be approximately F3 to go to the definition. And then to return would be alt-left.
running Spyder version 2.2.4.
Using Spyder IDE, can you return from "goto definition"? If you can, how do you return from "goto definition"?
I have a keyboard shortcut for "previous cursor position" set to Alt Left but "previous cursor position" doesn't do anything when I hit the key. (The default keyboard shortcut is ctrl-alt-left which conflicts with the Cinnamon-dekstop-manager keyboard shortcut for switching workspaces and so I had to remap the above mentioned keyboard shortcut.)
(Spyder maintainer here) You can use the shortcuts Ctrl + Alt + Left and Ctrl + Alt + Right to move to the previous/next cursor position, respectively.
Running Spyder You can launch it in any of the following ways: From the command line: Type spyder in your terminal (or Anaconda prompt on Windows). From Anaconda Navigator: Scroll to Spyder under Home, and click Launch. *Windows Only*: Launch it via the Start menu shortcut.
You can divide your scripts into as many cells as needed, or none at all—the choice is yours. You can separate cells by lines starting with either: #%% (standard cell separator) # %% (standard cell separator, when file has been edited with Eclipse)
To turn on the Word Wrap feature, go to View > Toggle Word Wrap or click the Edit Display icon in the Code Editor toolbar (it's the second-to-last one on the right) and select Toggle Word Wrap. You can also set the program preferences to keep this feature on by default.
Spyder have a one strange bug. Shortcut "Previous cursor position" only work if "Source toolbar" is present.
Turn on "View -> Toolbars -> Source toolbar". You can try it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With