Godot: Feature Suggestion for Code Editor: "Jump to last edit location"

Created on 11 Feb 2018  路  6Comments  路  Source: godotengine/godot

I have a simple feature suggestion, that I've found to be so very useful in another code editor.

Make Ctrl + Shift + Backspace to jump to previously edited location in code.

E.g. you edit some code somewhere... then you scroll/jump to another file, perhaps to simply look at some code for reference. It can be somewhat painful to go back where you were, particularly if you were editing the same file. I've found this shortcut to solve that issue.

discussion enhancement editor usability

Most helpful comment

If this is implemented, this could be bound to supplementary mouse buttons (BUTTON_XBUTTON1 and BUTTON_XBUTTON2), similar to JetBrains IDEs and Web browsers.

All 6 comments

Currently it seems the arrows on top right of the script editor provide such a functionality

@Zylann While those do scroll through the edited files history, it seems that OP is also asking for a feature to do that in the same file.

@YeldhamDev Yes, exactly, which is a major point of this suggestion. In addition, the arrows also don't seem to remember the scroll position based on my quick testing.

Maybe this is one of those things that might be difficult to see the point of (?) depending of personal coding preferences and/or if one simply hasn't used such a feature more.

To clarify:

  1. I add some code to function foobar()
  2. I realize/remember that I need to look somewhere as a reference / copypaste code from somewhere
  3. So I go there, copy/examine some code, and now I need to go back
  4. I either have to use the scrollbar, or CTRL + Fto find where I just was editing code, if it was in the same script. And this breaks at least my little "train of thought" quite effectively

This fourth step could be eliminated simply by jumping back to the last edit location via a shortcut

A bonus of this I've found is that if you leave your computer for some time, and then return after a while, possibly having forgotten what you were doing, you can simply tap Ctrl+Shift+Backspace to remind yourself.

You can already do this with Ctrl+Z -> Ctrl+Y.

If this is implemented, this could be bound to supplementary mouse buttons (BUTTON_XBUTTON1 and BUTTON_XBUTTON2), similar to JetBrains IDEs and Web browsers.

So I recently noticed that this is _partially implemented_ (although I guess it's a result of a bug). When you Ctrl+Click a variable, the editor will scroll to it's definition, but you can use the back arrow (the one that returns to last script) and it will return to your previous position. Heh.

Was this page helpful?
0 / 5 - 0 ratings