It’s difficult to fully appreciate just how much software has evolved over the past few decades. For example, the first version of Linux, the operating system upon which Google based its Android mobile operating system, was released in 1991, and it had just 10,239 lines of code. Today, Linux has over 25 million lines of code, and comparing its first version with the most recent one would be like comparing mechanical clocks with the atomic clocks used in global navigation satellite systems.
While most software applications that have been around since the 1990s are either unrecognizable or obsolete, there are a few select software applications that have managed to remain prominent while sticking to their roots. Vim is a venerable free multi-platform text editor that shares the same year of release with Linux and is often touted as the best choice for software developers, system administrators, and experienced users who want to be more productive, but that’s just one of many reasons why you should learn more about it.
Brief History of Vim
It’s often said that the people behind some of the world’s greatest achievements stood on the shoulders of giants, and the same can be said about Bram Moolenaar, the creator of Vim. Moolenaar based his text editor upon STEVIE (ST Editor for VI Enthusiasts), which was itself a clone of Bill Joy’s vi editor created for the Atari ST.
In fact, “Vim” actually stands for “Vi Improved” because that’s exactly what Vim is: an improved version of the most popular Unix text editor ever. Of course, it took Vim some time to gain all the features it has today. Support for multiple windows was introduced in 1993, graphical user interface in 1996, syntax highlighting in 1998, spell checking and code completion in 2006, and JSON support arrived with the latest major version upgrade in 2016.
At the time of writing this article, Vim is in version 8.1.0000, and its development is still just as active as it was decades ago, which is evident from its GitHub page. That’s current: the full code of Vim is available on GitHub, and anyone can study it, modify it, or use it to develop a brand-new text editor thanks to its Charityware license, which shares many similarities with the GNU General Public License and encourages users who enjoy the software to consider donating to children in Uganda. We love that Vim is mission-driven, not only making editing for developers easier, but bringing hope to orphans in Uganda through ICCF Holland, a passion project of Bram Moolenaar.
Capable and Extendable Text Editor
Vim has many useful features that allow it to compete with modern text editors such as Sublime Text, Atom, UltraEdit, or jEdit. They include search with support for regular expressions, the ability to easily repeat commands, straightforward recording and execution of macros, auto-completion, file merging, mouse integration, spell-checking, syntax highlighting, branching undo/redo history, support for popular network protocols and file archive formats, and more.
While Vim’s features are nothing short of impressive, its real strength lies in its extendibility. Vim has its own scripting language, called Vim script (also called vimscript or VimL), and users can use it to enhance Vim in a number of ways, such as enable syntax highlighting for additional programming languages, automate syntax checking, or integrate Vim with other applications and services.
In addition to its extendibility, Vim is also highly configurable, and the file containing Vim’s core global settings, called vimrc, can be shared between individual Vim installations. If you don’t fancy messing with settings and editing configuration files in your spare time but still want to enjoy Vim to its full potential, you can download one of many readily available configuration files from the internet or create one using a tool such as Vim Config.
Basic Vim Commands
There are many people who have decided to give Vim a try at one point but quickly gave up because they couldn’t figure out how to do even the most basic things, such as delete a word. The most common source of confusion is the fact that Vim has several distinct modes:
- Normal mode: In this mode, key presses don’t insert text but move the cursor. Normal mode can be accessed from other modes by pressing Esc.
- “h” moves the cursor one character left.
- “j” moves the cursor one row down.
- “k” moves the cursor one row up.
- “l” moves the cursor one character right.
- Insert mode: This mode is used for inserting text, and it can be accessed by pressing “i” on the keyboard.
- Visual mode: Used for selecting text, Visual mode can be accessed by pressing “v” on the keyboard.
- Command mode: This mode allows you to issue commands of varying complexity to Vim, and you can enter it by pressing “:” on the keyboard.
- Replace mode: When you want to replace existing text by directly typing over it, you can either press “r” while in the Normal mode or “insert” while in the Insert mode to enter the Replace mode.
Because there are many other Vim shortcuts and commands to memorize, it’s easy to get overwhelmed. When in doubt, you can always invoke Vim’s own documentation, which is carefully written and contains just about everything there is to know about the text editor, by issuing the “:help” command (use “:help keyword” to open help for a specific keyboard).
Alternatively, you can follow an interactive online tutorial, such as this one. It’s also recommended to print out a Vim cheat sheet with the most commonly used shortcuts. If you ever run into any problems while using Vim, you can ask for help on Stack Exchange or Vim’s subreddit, just to name two places with many friendly Vim users who are always willing to help.
Vim Stands the Test of Time
Despite being around for several decades, Vim is still just as relevant as it was when Bram Moolenaar released it in 1991. There are not many software applications with steep learning curves that are worth learning as much as Vim is. If you master this powerful text editor and customize it to fit your workflow, you will be rewarded with improved productivity and new appreciation for keyboard shortcuts. Best of all, Vim is available for all popular operating systems, so you’ll never need to learn another text editor ever again.
Below is a simple setup in Vim, with rotating lines to showcase the text editor. We encourage you to download Vim and try the editor for yourself. Happy coding!
Need web hosting for your project?
In need of web hosting for your project? With over a decade in the industry, WebHostingProf has analyzed hundreds of web hosts to bring you our top recommendations. See our top hosting reviews for our most popular use cases below:
- Have a slow website and wanting an upgrade? See our fastest web hosting recommendations to see how much your website speed can improve by switching hosts.
- If you’re a photographer, you’ll need a quality photography website host to store and server your high-res images.
- Are you eco-conscious, wanting to support green initiatives in your business? See our list of top green web hosting providers. Yes, carbon neutral hosting does exist!
- Do you deal with sensitive medical and patient information? If so you’ll need HIPAA compliant hosting to secure your data, especially with the recent legislature on patient privacy.
- Wondering how best to maximize your hosting budget? See our exclusive Bluehost deals page for the best price on the most popular shared hosting provider.