chaser // how to install Vim 9.1 on Debian Bookworm
Posted on
Want to use your favourite language server protocols with proper virtualtext support in Vim's latest release, 9.1 - but unable to do so from your favourite linux distro, Debian 12 Bookworm? Me too! Luckily, you can fix it - without breaking Debian!
Vim 9.1 is available in Debian testing. To install it, firstly create a new file in /etc/apt/sources.list.d/
called testing.list
with the following contents:
deb http://deb.debian.org/debian/ testing main
deb-src http://deb.debian.org/debian/ testing main
Now, running sudo apt update
will add the new list to your sources:
)
Debian testing can be seen in the sources. But wait - we only want Vim 9.1, and as it stands, many packages are being listed as upgradeable to their versions in testing! In order to avoid accidentally upgrading anything, we need to make another file, this time in /etc/apt/preferences.d/
called testing.pref
:
Package: *
Pin: release a=testing
Pin-Priority: -2
By specifying the priority to negative, apt
will never choose candidates from this release when running commands unless explicitly requested - so now a sudo apt update
shows the following:
)
In this manner, testing has been added safely as a source! Finally, to install Vim 9.1, we can now run
Since Vim has dependencies only on a couple of its own packages, we aren't going to be adversely affecting any core libraries with this upgrade. Check the new version is correctly installed:
|
)
Enjoy Vim 9.1 on your stable machine!