Why is it so hard to see code from 5 minutes ago?
51–60 of 424 posts
Re: Why is it so hard to see code from 5 minutes ago?
#52Does anyone know if there’s a good way to do this in VS Code? I often hold cmd-z until I get to some version and copy code from it. Ideally I’d like to have a separate window where I can see a previous version without affecting the current file/view. Before anyone comments, git doesn’t cut it for this because no one commits after every -+1
Re: Why is it so hard to see code from 5 minutes ago?
#53Re: Why is it so hard to see code from 5 minutes ago?
#54Earlier quoted context omitted.
Nope. Sometimes I’m rewriting something and I just want to see what the old code looked like before I changed it. There’s nothing smelly about that.
That's what a git browser is for. It's not like your code is gone forever, unless you are undisciplined.
Re: Why is it so hard to see code from 5 minutes ago?
#55Re: Why is it so hard to see code from 5 minutes ago?
#56jetbrains IDEs have a local history feature that seems to do this
Re: Why is it so hard to see code from 5 minutes ago?
#57For anyone that uses emacs, there is an excellent plugin "undo-tree" that solves this problem in a slightly different way. Everytime you undo a series of actions and then perform a new action, it creates a branch in the "tree". You can then visualize the tree and move through it quickly your entire buffer history.
By default, you can select any block of text and the undo command will cycle through the changes only from that region of your buffer.
Re: Why is it so hard to see code from 5 minutes ago?
#58Reading the comments, I'm stunned and disillusioned. Are most modern developers struggling to write code without this? If so, there is a fundamental problem that has nothing to do with levels of undo.
Re: Why is it so hard to see code from 5 minutes ago?
#59For anyone that uses emacs, there is an excellent plugin "undo-tree" that solves this problem in a slightly different way. Everytime you undo a series of actions and then perform a new action, it creates a branch in the "tree". You can then visualize the tree and move through it quickly your entire buffer history.