Best if last edited location key board binding is available in visual studio code. The same was eclipse has Ctrl + q.
You mean like this?

I'm on a Mac right now, but the Windows equivalent should be Alt + LeftArrow or Alt + RightArrow - see https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf
Closing since it appears we already have this behavior, but lmk if you were meant something different, and we can reopen. Happy coding!
Not this, This feature lets you navigate to the previous location where your cursor was.
Suppose you have written some code and you went to many files to debug some related code. Now you want to go to the place you were editing/writing last, it would be tedious to navigate back many time. Better if we have a key binding which instead of getting to last location take us to last edited location skipping all last traveled locations.
Let me know if you want to understand more.
Aha! Cool idea - thanks for clarifying :smiley:
Just want to confirm that this is indeed a very useful feature when one gets used to it :)
Ctrl+Q currently conflicts with workbench.action.quickOpenView but it's probably the most standard shortcut out there; IntelliJ IDEs use Ctrl+Shift+Backspace which is also quite a nice shortcut.
Ctrl+q is occupied, that was example how eclipse uses. According to me Backspace signifies something to delete.
So I suggest Alt+Shift+LeftArrow because Alt+LeftArrow takes us back and this will take us long back.
However developers can design and chose the more appropriate key bindings.
Hello, I would like to know if this feature has been added... It is a very useful feature, and exists in most of the IDEs...
Cheers
Same question as @chengtie , is this supported already somehow ? I am really missing this.
I use this extension as a workaround, works relatively well although I still think this should be a core feature of VSCode :)
Ya using this extension as well now however I wish it would maintain a list of the last edited locations and pressing multiple times the shortcut would allow you to go back to those. I think this is how Intellij is working if I am not mistaken.
For current editor you can use CTRL+Z, CTRL+Y.
@edvinv What if you are in different file?
@akshayat yes of course, it works only for current opened file.
any way, it will be great to have two separate keybindigs: for current file last edit position and for overall last edit position.
Would love to see this too, one of the features I miss the most from IntelliJ.
@mousetraps Any progress on this? This is definitely one of the most useful productivity features I miss from other editors. Once you have this in place, you can drill down into definitions/files and look around code to learn something and then in one fell swoop get back to where you left off.
+1
+1 (ctrl + -) works for now
ctrl plus or minus modifies window zoom level for me...
would also like to see ctrl+q behaviour
I like this short cut very much in eclipse, hope there also has in vscode
@alexandrudima I have this almost working (https://github.com/Microsoft/vscode/tree/ben/19120), but I need a better event from the editor to find out that a position change happened because of editing.
Added a new command "Go to Last Edit Location" (workbench.action.navigateToLastEditLocation) with keybinding (chord) Cmd+K Cmd+Q
@bpasero Can you explain how this is different to the "soft undo" command already implemented?
@bpasero
Added a new command "Go to Last Edit Location" (
workbench.action.navigateToLastEditLocation) with keybinding (chord)Cmd+K Cmd+Q
Thank you, this is very useful feature.
But if you already implemented it, do it 100%. Not navigate to only last edit location (like it implemented in eclipse), but navigate deeper in edit location history when pressed again (like it, in very useful way, implemented in inteliJ).
Most helpful comment
Added a new command "Go to Last Edit Location" (
workbench.action.navigateToLastEditLocation) with keybinding (chord)Cmd+K Cmd+Q