Can we set a restore point and restore a file's state while editing the file with VIM?...
I saw the "earlier" and "later" commands. But what if i dont remember the exact time to go back. So I want to know if there is a way to set restore points (and name them if possible) and restore the file using the restore point? Thanks..
| |||
|
feedback
|
|
There's no built in way to do this, but there's a superb plugin available here that allows you to do Overall, using a source control system is much better for general long term history, but this can be useful for navigating small changes. | |||||
|
feedback
|
|
No, not that I'm aware of. But you could just write (:w file) your file to a new name (e.g.with date+time appended). This will keep the original filename in your buffer (so :w, :x will continue to work normally). If you write the temp files to a temp directory, the OS can clean them up automatically. For bonus points, make that into a small vim macro, so you can invoke it with one key. | |||||||
feedback
|