Back in the old days, the geek ‘holy war’ was between the two editors emacs and vi. For some reason I was introduced to vi and after I got the basics down, the only thing I have done was install the improved version, vim.
More recent a new contender entered the market. With Ubuntu straightening the road to Linux for the not so geeky users, there seemed to be a need for a friendlier editor: nano. I have little experience with the editor and still get confused when I edit something on the command line with it.
On Raspberry OS you will have access to both nano and vi by default, as I am more familiar with vi, I will show you this editor, if you prefer nano, be my guest. To me, one of the beauties of Linux is the freedom of choice. To make you navigation a bit more intuitive you might want to use apt to install vim
vi basics
| Command | Explanation | 
|---|---|
| vi <filename> | Open a file for editing | 
| <arrow keys> | navigate through the document | 
| i | insert mode, needed to edit the document | 
| ESC | normal mode | 
| :w | write | 
| :q | exit (after saving or when no changes are made | 
| :q! | exit, discarding changes | 
| u | undo last change | 
