I want to keep Vim 8 but because I have several configuration files only working with version 7 I want to install Vim 7 in addition to Vim 8.

  • How do I find the path of the installed Vim 8?
  • Where and how can I install Vim 7 without "hurting" Vim 8?
  • How can I use different vimrc files for both versions?
  • And how can I call Vim 8 by vi and Vim 7 by vi7 or vim?

Thanks a lot!

  • I'm surprised, that Vim8 has problems with configurations written for Vim7. The other way around would be more likely. Perhaps you should first ask on vi.stackexchange.com for help porting your configuration. This would be easier than installing a second Vim version and managing two different sets of configuration files. – Ralf Jan 8 at 12:06

The initial problem of the questioner was fixed by installing the package "vim-gtk3" on Ubuntu. See this question.

But anyway: How to install a additional version of Vim beside a version already installed by a package manager?

Well, you compile it yourself.

If you do that, you should already know how to build Vim and how to install the result of this build. A description can be found in the YouCompleteMe Wiki Building Vim from source (leave out the part where they explain how to remove Vim installed by the package manager).

Anyway the important part in this scenario, is that the name of the executable should not be vim, but vim7. The same for all other executables (view -> view7, vimdiff -> vim7diff ...).

To do that, the following options for configure can be used:

  • --with-vim-name=vim7
  • --with-ex-name=ex7
  • --with-view-name=view7

Note that the name of the script vimtutor and gvimtutor and the executable xxd cannot be changed.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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