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

I recently discovered a way to learn Vim without fear: learn undo ('u') first! If you know that, you can just mess around with Vim commands until you inevitably screw something up, undo the changes, relax, take a deep breath, and Google whatever you're trying to do.


If you are familiar with vim, install gundo.vim and enjoy traversing your undo tree.


Awesome.


and Ctrl + R for redo.


... and this to go back to the state of the file 10 minutes ago:

  :earlier 10m
and

  :later 10m
to go back. Note: This is independent of undo/redo cycles as Vim keeps track of that in a tree-like structure. There's just no really great default way of accessing it. See Gundo for a plugin that tries to make it more accessible.


You just blew my mind.




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

Search: