Vim useful commands

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

To enter in edit mode press ¨i¨ and to exit to the button ESC

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:

Leave a Comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.