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
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
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