Let’s see we can operated and use VIM text editor.
To open the text document with Vim use command: vim [filename]
Vim has two modes. Command mode and edit mode. By default when we open file command mode is active. To exit from the file in this mode type:
:q
If you want first to save the changes and later to exit then type :wq (write, quite):
:wq
When you are in edit (insert) mode then we can edit our text.
So normally when you enter the file you enter in insert (with i) mode make changes then press ESC and then write :wq to save the changes and exit the file.
Vim in insert mode: