I realized I had deleted something for mistake when I typed :wq,then how can I rollback to the pre-version?Thank you!
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
|
||||
|
|
|
If you have backups set, you could try looking in your backup folder. In my .vimrc I have a line that says
I can retrieve old versions from there. |
|||
|
|
|
If you haven't yanked or deleted anything since then it may still be in the yank buffer and you can paste it in any vim session to show/restore it. |
|||||
|
|
|
If you have Vim 7.3 (which was not available at the time this question was originally asked) you may enable persistent undo, where undo information is stored and remembered across Vim sessions, by putting in your ~/.vimrc:
You may also want to set the '
|
|||
|
|