VIM, which stands for Vi IMproved, is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as “vi” in most UNIX systems and with Apple macOS.
To start with the VIM editor, you first need to understand its operating modes:
-
Normal mode: This mode is for editing and navigation. You enter this mode by opening vim or hitting
ESC
in any other mode. -
Insert mode: This mode is for entering text. You can enter this mode from normal mode by hitting
i
. -
Command mode: This mode is for entering commands. You can enter this mode from normal mode by hitting
:
.
Here are a few key commands to navigate more effectively inside Vim:
h
,j
,k
,l
- to move the cursor left, down, up, and right respectively.o
- to open a new line below the cursor and start inserting text.w
- to jump by start of words.
To save and quit from VIM, use the following commands:
:w
- to save your file but remain in vim.:q
- to quit from vim without saving the file.:wq
- to save your file and exit vim.
VIM might seem daunting at first, but with practice, it will become your cherished tool due to its speed, customizability, and wide range of plug-ins. So, don’t hesitate to learn the powerful VIM editor.