Survive in nano and vim
Open, edit, save and quit.
- nano, the simplest:
nano fichier.txt
- In nano: Ctrl + O saves, Ctrl + X quits, Ctrl + W searches.
- vim, present everywhere:
vim fichier.txt
- In vim: press i to type, Esc to go back to command mode.
- Save and quit: type :wq then Enter. Quit without saving: :q! then Enter.
- To choose the default editor: sudo update-alternatives --config editor (Debian/Ubuntu).