What is VIM

W

Vim means VI IMproved. It was known as Vi IMitation, but there are so many improvements that name change is warranted. Vim is a text editor that is included on almost all LINUX program commands as well as many other new ones. Orders are entered in the vi editor using only the keyboard, which has the advantage that you can keep your hands on the keyboard and your eyes on the screen instead of moving your hand over the mouse repeatedly. For those who do not consider keyboard input only as an advantage, both mouse integration and a graphical version that provides menus and scroll bar can be activated. We will refer to vi or vim in this article when we talk about editing files, having the freedom to choose any editor you want.

However, we recommend that you even assimilate elemental concepts related to vi, as it is the standard editor on almost all LINUX systems, Emacs being an optional package.

There may be small differences between different computers or terminals, but the main idea is that if you can work with vi, you have every chance of handling any LINUX system.

In addition to the vim commands, the vim package may contain gvim, the vim version of Gnome. Beginner users find it easier to use because the menus help them in padded cases or do not know how to perform a particular task using standard vim commands.

Vi editor is a powerful tool that has a comprehensive manual that can be enabled by command: help when the program is started (instead of using man or info that does not contain so much information). We’ll just discuss the main commands that let you start working with vim.

What makes you be confused for beginners is that it can work in two ways: command mode and insertion mode. Command mode lets you navigate through text, search, replace, mark portions, and perform other editing tasks that can get the publisher into insert mode.

This means that any key has not one, but two meanings: it can either represent a command of the editor when you are in command mode or a character you want to be inserted in the text if you are in this mode.

Text navigation is usually done with the arrow keys. If you fail, use it
-h to move the cursor to the left
-l to move him to the right
-k to move it up
-j to move it down

SHIFT – G will take you to the end of the document

Here are some very popular commands:
1. n dd will delete lines starting from the current cursor position.
2. n dw will delete words from the right of the cursor.
3. x will delete the character on which the cursor is positioned
4. : move to line n of the file
5. w will apply the changes – it will save – (write) the file.
6. :q you will exit the editor.
7. :q! forces the output when you want to exit a file that contains unapplied changes.
8. wq will apply the changes and exit the editor
9. :file_nu will save the text to the file_file
10. :WQ! overwrites file permissions (if you have permission to do so, for example, if you use a root account.
11. recover will recover a file in case of an unexpected interruption.

Recent Posts

Archives

Categories