Arch: Installing vim 9 from source code

Summary

The vim that is installed by default when installing arch does not support neither clipboard nor python. The same applies to the vim version that can be install from the remote repositories using `pacman`. The objective of the posting is to install vim 9 complied with clipboard and python support.

See also: install vim9 from source code

Check vim version

To check whether vim supports clipboard or python we can use the vim –version command and check the output as we can see here:

[john@archlinux ~]$ vim --version
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jun 17 2024 22:29:09)
Included patches: 1-496
Compiled by Arch Linux
Huge version without GUI.  Features included (+) or not (-):
-clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3/dyn       +virtualedit

Note the minus sign before the clipboard and the python features; this means that the installed version of vim does not support them and this is what we need to fix.

Installing vim from source code

sudo pacman -S vim

git clone https://github.com/vim/vim.git

cd vim/src

./configure --with-features=huge --enable-multibyte --enable-rubyinterp \
--enable-python3interp --with-python-config-dir=/usr/lib/python3.12/config-3.9-x86_64-linux-gnu \
--enable-perlinterp --enable-luainterp --enable-gui=gtk2 --enable-cscope \
--prefix=/usr

sudo make install

Ubuntu: Installing vim from source code

Leave a Reply