What's new in Vim 8
Editor Upgrade
We explore the new goodies in the latest release of this classic text editor.
Forks in the free software world are usually a messy business. Egos get damaged, development effort dilutes, and it takes a long time before the two resulting projects end up working together. But, at the same time, forks are sometimes necessary to keep the bulk of contributors happy and keep the project moving along – look at what happened with XFree86 and X.org, for instance. The former was moving at a snail's pace and failing to attract new developers, but when the X.org fork arrived and most of the XFree86 team moved over, things got a lot better.
What has this got to do with Vim [1], the venerable command-line text editor with its notoriously steep learning curve? Well, Vim has had its own set of problems over the years. It's a very mature and reliable editor, but the code underpinning it was packed with cruft and suffering from bit-rot. This is inevitable given that Vim runs on pretty much every major operating system you can name – but the ancient codebase was impeding progress. New features were hard to implement, and new contributors were sometimes scared off.
So, a fork called Neovim came to life in 2014, with the goal of drastically refactoring Vim's code to provide better scripting support and improved performance and to generally clean up the cruft. For a while, it looked like Neovim could become the new Vim – just like X.org became the new XFree86. Bram Moolenaar, the lead developer of Vim, was skeptical about some of the changes in Neovim, but he didn't just close up shop and declare Neovim as the future (Figure 1). No, he and other Vim developers have been incentivized by Neovim to improve the original codebase – so, whatever happens with Neovim in the months and years to come, the fork has definitely benefitted the original project as well.
A Decade of Waiting
Vim 8 was released in September 2016 and is the first major release since Vim 7 way back in 2006. (Although in fairness, versions 7.1 to 7.4 of Vim included some pretty major updates as well.) Given that Vim is one of the most popular text editors in existence, and many developers can't imagine living without it, we thought we'd take a close look at the new release and see what has changed. As you'll discover over the next few pages, many of the updates are "under the hood," rather than user-facing, but the new version has plenty of goodies that will improve your day-to-day text editing life, as well.
Once we've whetted your appetite, you can check your distro's package manager to see if Vim 8 is available. If you want to build the new release directly from source code, head over to the Vim website for downloads and instructions [2] – we provide a quick install guide later in this article.
Five Things to Try
The best new features to speed up and simplify your editing workload.
1 Asynchronous I/O
Previous versions of Vim were very limited in terms of running background processes. If you needed to perform such a task, like running a test suite, Vim would usually wait until the process was completed, meaning a lot of waiting around if you run many such processes regularly. With Vim 8, the editor can run tasks entirely in the background and then exchange messages with them asynchronously using channels.
So, imagine you have a background process that performs some checks on the source code file you're editing. Previously, Vim would wait for the process to complete before showing the results, but now the editor can run the task and communicate with it while you continue editing. If the background task needs to alert you to something, it can tell Vim to display a message, move the cursor to the appropriate place in the file, or do whatever else it deems necessary.
Additionally, Vim 8 supports JSON, the JavaScript Object Notation format commonly used for data interchange. This allows developers to write complex plugins in a variety of languages that then communicate and exchange data with Vim in a commonly used, standardized format.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.