Every time I try to edit a file in Unix using vi, I end up corrupting the file rather than “editing” it.
To get out of the mess I resort to q! command which helps me to exit from editor without saving the modifications. Incidentally this command (q!) happens to be one of the most used commands by me
An alternative to avoid this mess is to start the XServer and use gedit/kate to edit the file. However this is not suitable if you want to quickly make few changes in the file.
So I have decided to master vi in one week (hopefully it should be enough).
If you are also in a similar soup and want to learn vi, try out these links
Also this graphical cheat sheet should come in handy !
There is a tutorial based on the graphical cheat sheet. You can find it here
If you know any other good sources of information to learn vi, let me know