I compiled vim 8.1 for Ubuntu 16.04 x64, from source, by following Valloric's excellent guide on the subject. Although that guide is for an older version, it was really simple to check out the correct version I wanted using git.

I ran ./configure with the same options as that guide, except for the following:

  • I omitted Python 2 support since Python 2 + Python 3 support is a bit messy.
  • I set --prefix=/mnt/my_data_drive/software/vim/

After this, I ran the following commands

mkdir /mnt/my_data_drive/software/vim/vim81
make VIMRUNTIMEDIR=/mnt/my_data_drive/software/vim/vim81
make install

After this, the bin, and share folders were created correctly, but the vim81 folder was empty.

If I tried setting VIMRUNTIMEDIR for make install, it made no difference. If I fail to create vim81, the directory is not created for me.

As a result of this, I'm unable to turn syntax highlighting on in my .vimrc. The line simply results in: syntax.vim: No such file or directory.

Could you please help me solve this issue?

2 Answers 2


I build Vim 8.1 on Ubuntu 16.04 and install it to the custom directory /opt/vim.

My steps:

./configure --prefix=${INST_DIR} --mandir=${INST_DIR}/share/man ...
make test
make install

This works as expected.

You can run make -n install. Then make just prints what it would install, without actually doing it. Check the output, it should contain lines like the following:

cp  ../runtime/doc/*.pl /opt/vim/share/vim/vim81/doc
chmod 755 /opt/vim/share/vim/vim81/doc/*.pl
cd ../runtime/doc; if test -f tags.dist; then mv -f tags.dist tags; fi
cp ../runtime/menu.vim /opt/vim/share/vim/vim81/menu.vim
chmod 644 /opt/vim/share/vim/vim81/menu.vim
  • I tried capturing the make install output, but the lines copying to vim81 were missing. I'll report back with more findings, and hopefully, we can solve this problem. Thanks for replying.
    – batbrat
    Commented Apr 8, 2019 at 5:55
  • This really helped me solve the issue. Having your output of reference allowed me to find the root cause.
    – batbrat
    Commented Apr 8, 2019 at 16:47

Setting VIMRUNTIMEDIR when running make only specifies the runtimedir for the vim installation. It does not set the runtime directory. The actual location of the directory is controlled by --prefix. The runtime directory location will be:

# Depending on the version of vim being built, this might be vim74. 
# In general, the format vimXY, where X is the major version number,
# and Y is the minor version number is followed.

When running make, one should:


This will cause the resulting vim install to look in the correct location, and hence, it will find syntax.vim etc.

TL;DR: VIMRUNTIMEDIR is actually populated correctly. The location is determined by the --prefix option during the configuration phase, and the proper path must be given to make. In the case of vim8, not specifying the VIMRUNTIMEPATH is fine.

  • I don't understand why you need VIMRUNTIMEPATH=... on the make command line. I also install to a custom location and I don't need it.
    – Ralf
    Commented Apr 8, 2019 at 16:59
  • @Ralf, it is not required when building newer versions of vim, such as vim 8.1. Valloric's guide says that it must be set properly for older versions. As such, the whole process works if I don't set it. If I do set it, it needs to be correct.
    – batbrat
    Commented Apr 8, 2019 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.