vi
and vim
are completely different from nano
. With nano
, you are able to use keyboard shortcuts to save files, open new ones and access other "non-text editing" functionality. vi
/vim
are different because they are modal: there is an Insert mode (which you have reached by accident) and a Normal mode. Insert Mode is equivalent to the normal functionality of an editor like nano
, and Normal mode is specifically dedicated to commands. For example, to save a file in vim
you enter :w
(for write) in Normal mode.
I would suggest looking up and reading a vim
tutorial. After running through the basics, you can start to digest the breadth and depth of vim
functionality by looking at tips and cheatsheets. Definitely learn the basics first, though!
vimtutor
.