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
-
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
-
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.