Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TX256 opened this issue Feb 11, 2018 · 6 comments · Fixed by #63515
Closed

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

TX256 opened this issue Feb 11, 2018 · 6 comments · Fixed by #63515

Comments

@TX256
Copy link

TX256 commented Feb 11, 2018

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.

@Zylann
Copy link
Contributor

Zylann commented Feb 11, 2018

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

@YeldhamDev
Copy link
Member

@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.

@TX256
Copy link
Author

TX256 commented Feb 11, 2018

@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 + F to 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.

@KoBeWi
Copy link
Member

KoBeWi commented May 1, 2019

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

@Calinou
Copy link
Member

Calinou commented May 1, 2019

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

@KoBeWi
Copy link
Member

KoBeWi commented Mar 24, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants