Vim editor (Linux) tips and tricks!
Answer for main question is:
"To quit the vi editor without saving any changes you've made: If you are currently in insert or append mode, press Esc. Press : (colon). The cursor should reappear at the lower left corner of the screen beside a colon prompt. Enter the following: q!" (c) Google
Best solution for Vim editor is - do not use Vim editor!
But sometime you can find Vim as a default editor for something, for example (this is my experience) when you type:
$ sudo crontab -e
you can become a beginner user for Vim editor. In this case use instructions which above. Just press Esc, and then type ":q!" (without quotes).
After this you can setup other default editor (Oh-yea!), just type:
$ sudo select-editor
Then you will see something like this:
Select an editor. To change later, run 'select-editor'.
1. /bin/nano <---- easiest
Choose 1-3 :
Then read instructions and chose best. My choice is 1 - "/bin/nano". If you don't have nano, you can install it with this command:
$ sudo apt-get install nano
I think that best editors is nano or pico. Nano is much easier to use then Vim.