Introduction
Vim, abbreviated by Vi Improved, is one of the most powerful and versatile text editors in the Linux ecosystem. Although its interface may be intimidating to newcomers, its mode-based design and its wide set of shortcuts allow files to be edited with a speed and accuracy that few graphic editors can match. In this article we will explore what Vim is, how your mode system works, the essential commands to start and some customization options that make this editor an indispensable tool for developers, system administrators and anyone who works with text on the command line.
What is Vim?
Vim is an improvement of the original editor Vi, created by Bill Joy in the 1970s for the UNIX system. Developed by Bram Moolenaar and released publicly in 1991, Vim retains Vi's philosophy but adds features such as syntax highlighted, multiple file editing, integration with compilation tools and a powerful macro system. It is available by default in most Linux distributions and can also be installed on macOS, Windows and other operating systems by means of packages or compilation from the source code. Its license is charitameware, which means it is free but users are encouraged to make donations to child support in Uganda.
The modes of Vim
One of the most distinctive features of Vim is its organization in modes, each with a specific purpose and a dedicated set of shortcuts. By understanding how to change between them and what actions to do in each, the user can navigate, edit and manipulate text extremely efficiently. The four main modes you will find when working with Vim are described below.
- Normal mode: is the default state when opening Vim; here the files are navigated with movements like h, j, k, l and editing commands are run.
- Insertion mode: allows to insert text directly into the cursor; it is activated with i (insert before), a (then), or (new line below) or O (above).
- Visual mode: facilitates the selection of text blocks; it is activated with v (visual by characters), V (visual by lines) or Ctrl + v (visual block).
- Command mode: is entered with: and allows to run orders such as save (: w), exit (: q), search (/ pattern) or replace (:% s / old / new / g).
Basic commands to start
To make the most of Vim from the first day, it is useful to know some fundamental commands that allow you to open, save, close and move into a file without leaving the keyboard. These shortcuts form the basis on which more advanced workflows are built, such as multiple file editing, macro execution or integration with external tools such as git and make.
- : e
- opens a file for editing. - : w - save the changes to the current file.
- : q - leaves Vim if no changes are pending.
- : wq or 😡 - keep and leave in one step.
- dd - removes the line where the cursor is.
- yy - copy (yank) the current line.
- p - paste the contents of the record after the cursor.
- u - undo the last action; Ctrl + R redoes.
Good practices and advice
To make the most of Vim, it is recommended to adopt some habits that facilitate learning and daily use. First, spend a few minutes each day practicing basic movements in normal mode until they become intuitive. Second, take advantage of the command: help to access integrated documentation and discover new features without leaving the editor. Third, keep your .vimrc organized by commented sections and use a plugin manager to install only what you really need. Finally, remember that patience and constancy are key; over time, complex actions will be executed almost without thinking.
Customization and plugins
One of the great advantages of Vim is its ability to adapt through a configuration file called .vimrc (or init.vim in Neovim). In this file you can define custom shortcuts, change the color scheme, activate the syntax highlighted for different languages and load plugins that add functions such as self-completed, project management or integration with debugging. The most popular plugin managers are Vundle, Pathogen and, more recently, vim-plug, which facilitate the installation and updating of extensions from repositories such as GitHub.
- YouCompleteMe - semantic self-completed.
- NERDTree - tree-type file browser.
- fugitive.vim - integration with Git.
- ale - linting and correction in real time.
Conclusion
Dominating Vim may seem an arduous task at first, but time investment is rewarded with remarkable productivity and a sense of absolute control over the text. Its almost universal presence in Linux systems, low resource consumption and unlimited customization make it a timeless tool that remains relevant both for beginners who want to learn the basics of text editing and for experts who seek to optimize their daily workflow.


