4 ms·
All the JetBrains IDE's keep a history of your edits, I accidentally rm -rf'd the wrong dir and reverted my code back thanks to JetBrains. I can't imagine vim s
by giancarlostoro 9y ago
All the JetBrains IDE's keep a history of your edits, I accidentally rm -rf'd the wrong dir and reverted my code back thanks to JetBrains. I can't imagine vim saving your old files that have yet to be checked in to SVN / git (breaking changes anyone?) that you've not yet opened on vim.
Funny you mention that though, a coworker opens files in vim and does changes and tests but keeps it open if he's going to try something else so he can always go back to those other changes (guessing he reverts the code, then opens yet another vim window). I work with a lot of VI(M) coders but they barely take full advantage of VI(M). I just use IDE's or Emacs / VS Code (w/ X Forwarding more recently) personally makes it easier to find the fancy features with a UI.
I'll share that time travel feature to my VIM coworkers maybe it'll save their tail sometime.
- williamxd3 9y agoDid that too, I thought history wouldn't work cause the .idea folder inside was gone, but it did. JetBrains saved me some good 5 hours of work that day.
- chongli 9y agoVim also has persistent undo. Check out the options: undofile undodir These will cause vim to store all file histories into files within that directory. Now you can close and reopen vim and continue undoing as much as you want!
- marcoperaza 9y agoDo you know if there’s a way to make “normal undo” stop at the beginning of the current session, then have some special command or confirmation that I indeed want to move further back? I almost never want to undo past the current session, but occasionally I do.
- some_account 9y agoIt has saved me too a couple of times. Jetbrains for the win :)
- reitanqild 9y agoFWIW Netbeans also keeps local file history. (Nothing against Jetbrains. They seem like a great company with great products and a really nice pricing model, I just prefer Netbeans.)
- giancarlostoro 9y agoAfter IntelliJ I prefer NetBeans to be fair. I like JetBrains due to all the IDE's they offer me with consistent capabilities between all of them.
- timrichard 9y agoIt's a great feature, and I use Local History a lot. One thing to bear in mind, though, is that it will go if you invalidate caches.