DEV Community

Cover image for Why You Should Learn Vim

Why You Should Learn Vim

harvey profile image Harvey ・2 min read

Vim is the best text editor out there. I have been using it for almost a decade now and I’m not going back to Sublime Text or Atom or even Notepad. The fact that you can do all of your development work in the same tool that is also used to write your code is amazing.

Vim is a powerful text editor with a lot of history and a certain aura of mystique around it. In this article, I'll try to dispel some of the myths around Vim and explain why you should learn to use it on the command line.

Anyone who spends significant time in front of a terminal should consider learning to use vim.

It's everywhere 🆒

First, why not learn to use Emacs or [insert favorite text editor here]? The two main reasons I like Vim are that it's ubiquitous and easy to use. Most server installations have Vim available. There's even a version included with Mac OS X.

You can use it while coding, writing articles, notes, or even making spreadsheets. It can literally be everywhere you are! You can edit files through ssh!

Useful skill 💻

Unlike the latest frontend framework or latest shiny language, vim always stays the same through the years. So it's good to learn vim.

Vim has been the main editor used by most Linux users for at least 15 years, so you'll almost certainly find it on any server where you need to log in via SSH.

Learn Vim by interactive exercises, no need to struggle with man pages or blogs.

Keyboard shortcuts for everything

You can use the keys to navigate your code and vim. Press gg to move to the top of the file, press G to move to the end of the file, press / to search etc.

Once you know the shortcuts, it's a lot easier than grabbing your mouse and going to the menu bar, click edit, click find etc. It saves you a lot of time when coding.

Great for coding

Any reasonably recent version of Vim has strong support for all kinds of programming languages, so it's great for editing source code.

Vim supports all kinds of plugins and can be used even over an ssh connection to a sever.

On top of that, you can use plugins like YouCompleteMe for code completion and NerdTree for a file browser.

vim syntax highlighting

Discussion (0)

Forem Open with the Forem app