-2

I want to know the basics of vi editor because I am new to linux and currently I am using ubuntu 16.04.

1
  • <esc>:q! To close the file without saving.
  • <esc>:wq To close the file with saving.

Those are the first two commands that I teach people who need to use VIM in a pinch. They are useful, and provide a base for understanding the use of the <esc> key and : commands.

As Christian mentioned in his comment, VimTutor is probably the best way to learn VIM. Just type vimtutor at the CLI and follow the instructions on the screen.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.