VI/VIM Editor – Basic Guide

VI / VIM Editor The most popular document viewer and editor in Linux. Here’s a look at some of the most commonly used features.

Input Mode

press i

You can add or delete content through the input mode.

If you want to end input mode, press esc key

File Mode

press :

VI / VIM performs the file mode by entering the following command. You can enter the following mode through double quotes. In the file mode, you can do save or quit current file. and you want to exit file mode, press esc key

Save

w

wSave the file.

Exit

q

qQuit VI / VIM.

Forced progress

!<q>or<w>or<qw>

You can force exit, save, etc. with! Frequently used situations have been modified. If you proceed through q, you will not be able to exit because of the modifications. This will force exit input!q and you can without saving.

Search

press /

Find the match value entered in the current file. If there are find values, press enter
You can jump to the next and previous values ​​through n and N key

n - next
N - previous

Delete line

press d twice

This function is used when you want to delete several items. You can delete them by line by pressing d key twice.

There are many other convenient shortcuts, but basically you don’t have to worry about this.

Facebook Comments

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Detection ADBlockPlease, Disable or add to white list on our site.