What's new in Vim 8
2 Timers
This is another huge step forward and is related to the previous feature. With timers, you can call a function in Vim after a certain amount of time and have it performed only once or repeated at regular intervals. This may simply be a function built in to Vim, or you could use it to call a background process as described earlier.
So, what could you potentially use this for? Well, on its own it might not sound especially useful, but in the context of Vim scripts, it can do a lot. You could use it to make backups of the currently opened file or regularly add information to a status bar in the editor (such as a clock, or CPU load indicator, or a number of new email messages that have arrived). We expect plugin developers to make big use of this feature in particular.
3 Packages
Some people prefer to use Vim in its most vanilla form, maybe with a few customizations to the .vimrc
configuration file to make it look a bit prettier. Other users – especially developers – build up a massive armory of plugins and add-ons to turbocharge the editor, but until now, there has been no standard way to manage them. Sure, we have third-party solutions in the form of Pathogen, Vundle, and others, but wouldn't it be better to have this dealt with inside the editor itself?
Well, with Vim 8, native support for packages is now included. You won't need to install an add-on just to be able to install other add-ons – the process will be a lot simpler. At the time of writing, as Vim 8 had only just been released, many popular plugins had not been converted to use the new package format. But, we hope to see some of our favorites moved over to the format soon, including:
- Vim-Airline [3] – An attractive and versatile status bar (Figure 2).
- Solarized [4] – Smart and eye-friendly syntax highlighting schemes (Figure 3).
- Surround.vim [5] – Key bindings that work with parentheses, brackets, quotes, XML tags, and so on.
- NERD tree [6] – A tree-form filesystem exploration tool.
- Fugitive.vim [7] – Pretty much essential if you use Git.
4 Window IDs
If you're a casual Vim user but haven't delved into the more advanced features of the editor, you may not be aware of windows – or "viewpoints onto a buffer" in Vim parlance. You can open multiple windows in Vim to view different files or, indeed, work on the same file, and this feature is especially useful if you're not also rocking a terminal multiplexer such as Screen or Tmux.
Anyway, until now, windows in Vim were given numbers for identification, and as you opened and closed windows, these numbers would change. This was pretty frustrating if you remember that you had /etc/hosts
open in window 5 but, because of some other window operations, that has now moved to window 2. Well, in Vim 8, windows now have their own unique IDs, making them a lot easier to find and work with.
« Previous 1 2 3 Next »
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
-
Endless OS 6 has Arrived
After more than a year since the last update, the latest release of Endless OS is now available for general usage.
-
Fedora Asahi 40 Remix Available for Macs with Apple Silicon
If you've been anticipating KDE's Plasma 6 for your Apple Silicon-powered Mac, then you're in luck.
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
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.