The best and basic vim commands that are useful

Vim stands for vi improved and it is a free of charge, open source software. Its various versions are accessible for nearly all operating systems, Android as well as iOS smartphones. Just in case, if you switch to control mode, the letters on your keyboard will allow you use Vim commands to take actions such as text, edit, delete etc. You must know, there are two modes for vim commands such as insert and command mode-

Insert mode

Insert mode is the mode that let you insert any text or edit something normal. This allows you to type text in a given document as well as you need to press ‘i’ for insert mode.

Command mode

Command mode is the type of vim commands that is important while you are giving commands to the editor. For this command mode, firstly, you have to press ESC button that takes you direct in command mode. In this mode, you move about the file, and alter some parts of the text,copy, cut, and paste parts of the text.

Let’s have a look on the basic vim commands

CTRL-R

‘CTRL-R’ is the basic command to redo any text or something.

dw

‘dw’ is the special command to moving the cursor at the start of the text that you want to delete.

d2w

‘d2w’ command lets you delete 2 words together at the same time.

u

‘u’ command is use to UNDO the last text or command you have done.

:wq

If user wants to save before exit, ‘:wq’ is used for saving and exit at that time.

x

By mistake if you type something unwanted, you can use this ‘x’ command for deleting unnecessary words.

A

To add any text at the last line, ‘A’ command is used.

3e

‘3e’ is the important command that will help you to move the cursor to the last of the third word.

:q!

If you want to trash all the modification you did, ‘:q!’ is more helpful.

e [file]

‘e[file]’ is used to open any file or document where [file] stands for name of proper file you want to open.

w

‘w’ vim basic command saves the file you are working on.

help[keyword]

When you enter any keyword, this help[keyword] helps you in searching for that keyword.

 

These are the easy and basic vim commands to open, edit, delete, and close, save documents.  Vim is understandable as well as simple to use for beginners, it just engages identify Vim editor commands and detection what approach you’re in. apart from that, vim is a systematized text editor which allows competent text editing.

 

Tags:,

Add a Comment

Your email address will not be published. Required fields are marked *