Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I use '" (tick, double quote) all the time, after exiting and coming back into a file it jumps back to where I was.

Time travel in vim is insanely cool. ":earlier 5m" undoes changes to the buffer to make it like it was 5 minutes ago. ":later 1m" will travel the other direction.

Also useful in undo/redo is "g-" and "g+" which undo and redo non-linearly. With just "u" and "^r" you can get to where some undo states are reachable, g-/g+ can get you to those missing states.



Doctor Strange did a specific kind of time travel in a Marvel movie that I want in vim. He did it to an apple, but not the surrounding area. I would like to be able to highlight a selection in vim and just do time travel in that part, so that my changes elsewhere are not reverted. Does that exist?


It exists in emacs. Blew my mind when I first saw it!


What's the feature called?



I've been looking for this in a code editor for so long. I just want to undo inside a specific set of lines, is that so hard?


Right? Ever since I learned it exists in emacs I’ve been frustrated that this isn’t the top priority in every other editor!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: