VIM save options to protect file from too easy delete?
by papazulu from LinuxQuestions.org on (#58HQ7)
Hi,
I am looking for a save option in VIM (not crazy high level), just something simple that keeps me from easily deleting a file I have created.
For instance, if I save file 'test' in VIM all I have to do to delete it is ' rm test '. How can I save file 'test' so that simply typing ' rm test ' does not delete the file forever?
Some suggestions on other non VIM methods for protecting files are welcome. But the main idea here is something not extreme. Something simple and low level. Over the post month I have been relearning Linux and managed to accidentally delete some longish C programming files that I had to retype out. I want there to be an option in VIM that saves a file so that it asks me before deleting.
Thank you,
Jon.


I am looking for a save option in VIM (not crazy high level), just something simple that keeps me from easily deleting a file I have created.
For instance, if I save file 'test' in VIM all I have to do to delete it is ' rm test '. How can I save file 'test' so that simply typing ' rm test ' does not delete the file forever?
Some suggestions on other non VIM methods for protecting files are welcome. But the main idea here is something not extreme. Something simple and low level. Over the post month I have been relearning Linux and managed to accidentally delete some longish C programming files that I had to retype out. I want there to be an option in VIM that saves a file so that it asks me before deleting.
Thank you,
Jon.