4 ms·
In Sublime Text I actually use a quick Undo-then-Redo to navigate, of all things. I'll be typing some code and realise I need to check whether the imports at t
by craigds 6y ago
In Sublime Text I actually use a quick Undo-then-Redo to navigate, of all things.
I'll be typing some code and realise I need to check whether the imports at the top of the file are correct.
So I'll Cmd+Up (go to the top of the file) and see that yes, they are correct. Now I have to get back to where I was.
A quick Cmd+Z,Cmd+Shift+Z does the trick - Undo (takes me back to the code I was editing, and undoes some of it) and Redo to put it back to how it was. Works well, but would mess up this researcher's statistics.
(I absolutely do also use the undo stack for looking at the last few minutes of history too, that's really valuable)
- wodenokoto 6y agoThere is a navigational back command, that moves your cursor back in time, just like a webbrowsers back button. cmd+-, if I remember correctly.
- caillou 6y ago`ctrl + -` is a good short-cut. But, often times I have jumped around many times, or only scrolled. It doesn't work in these situations. Whereas `undo` `redo` reliably brings me back to the place of last input.
- wodenokoto 6y agoWhat ever works for you. To return to scroll position I click up then down or left then right. You can use `ctr + -` to also jump between documents. So if you’ve jumped to a function definition in another document the back shortcut can take you there.
- teddyh 6y ago> Now I have to get back to where I was. In Emacs, you can often use C-x C-x for this, since many movement commands which moves far away, like beginning-of-buffer, sets the mark at where you moved from. So C-x C-x moves you back. If this does not help, i.e. you have moved several times, you can almost always get back by repeatedly doing C-u C-Space until you find yourself at the correct place again.
- zegl 6y agoFunny, I've been using the same trick in VSCode without reflecting on it.
- Resinderate 6y agoI do a similar thing, but I use "soft_undo" as it seems to include navigation jumps in it's stack so it's only one step. Think the default keybind is Cmd+U.