Basics of vim – Create, edit, save and quit in vim.

How to use vim in Linux.

Vim has two modes. Command mode and insert mode. In command mode we can tell the editor to substitue, edit, insert, append, save, quit etc. By default vim opens in command mode. To switch to insert mode press “i” in command mode without quotes. Here you can edit the file with whatever content you want to.

To switch to command mode press “Esc” key. Here we can give commands to save and quit. To save press :w then the file will be saved and to save and quit press :wq.

Here is a video enplaning the same.