Why do you want to start using Vim?

Satheesh Kumar
3 min readAug 5, 2019

--

Editing a Basic Django Application

Vim is a highly configurable terminal-based text editor for efficiently creating and changing any kind to text. Vim is designed for use both from a Command Line Interface(CLI) and a standalone application in Graphical User Interface(GUI).

with that said, below are the reasons why I started using Vim.

1. Free and Open Source

Vim is free and open-source software, and it’s released under a license that includes some charityware clauses. The Vim developer, therefore, urges users who like the software to consider donating to underprivileged childer in Uganda. The license is compatible with the GNU General Public License.

2. Customizable and Extensible

Vim is highly configurable and it has an extensive plugin system, there are lots of good plugins out there that enhance its functionality.

One of the finest collection of the plugins I have come across is spf13-vim — The Ultimate Distribution for Vim Editor, which is a cross-platform and highly customizable assortment of Vim plugins and various resources for Vim, GVim, and MacVim.

3. Support for all file formats and programming languages

Vim supports several programming languages and file formats. It detects the file type of the file being opened automatically, this is done by using the format in the filename and sometimes inspecting the contents of the file.

4. Operational Modes

Vim has two different operational modes that make it more friendly to use, shifting between these 2 modes and learning the commands that can be used in these modes are a little difficult till you master it.

  1. Command Mode

Only for understanding the commands Vim editor opens this mode. In this mode, we can move the cursor and select (ctrl+v), cut, copy (y), paste(ctrl+p) the text. Also, we can save the changes we have made in this mode (:w) or undo (:u) the changes. We can even quit (:q) the editor from this mode. Below are the few commands that I use mostly in this mode.

  • :vsplit <filename> — Splits the screen and open the file
  • :edit <filename> — Opens and edits the file in the current window
  • /<pattern> — Search and highlights the particular pattern
  • n — move to the next occurrence in the search
  • !<shell_command> — Executes the shell command
  • ctrl+n — Opens nerd tree
  • :wq — Save and Quit
  • <line_number>gg — Jumps to the given line

2. Insert Mode

This mode is used for inserting text in the file. By pressing ‘i’ or ‘insert’ on the keyboard we can switch to insert mode. To go back to command mode we can press the ‘ESC’ key.

5. User Configuration

Many modern text editors such as Atom and Code allows users to customize their appearance, keybindings, and extend functionality with first and third-party extensions. Vim does a great job of this by centralizing these into a single .vimrc file. Since this configuration file is decoupled from the editor, you can check this into your own Git repository and sync to other machines.

6. Memory Usage

Source: Commit Log

The IDE (vscode) which I used earlier took 349MB in order to open a 60B file. whereas Vim took only 5MB to open the same file.

Isn’t this crazy :)

7. Conclusion

Learn to use Vim. It’s worth reading this awesome book written by Drew Neil on Vim.

Practical Vim by Dre Neil

I have used mostly all the editors and IDE’s that can be used for development from unpaid to paid versions, but finally, when I was exposed to Vim it attracted me and from then on I removed all the editors and IDE’s and started using vim.

--

--

Satheesh Kumar
Satheesh Kumar

No responses yet