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
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.