I teach classes that cover both Vim 7 and Vim 8. Is it possibly to install Vim 7 and Vim 8 together on CentOS? If so, how?
Everything I've have looked at so far covers updating Vim 7 to Vim 8. I need both environment for teaching purposes.
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.Sign up to join this community
@christian-brabant has the gist of it. At least one of them needs to be an installation outside of your package manager. Of course, if you are using an add-on package manager like conda, you can probably find them and stick them in different (virtual) environments.
To do it yourself.
Having multiple versions of software on a system only really requires, that those versions are installable and having a place to put them (it sounds pedantic but it is true). For Vim one way you can install both versions yourself is by following the instructions at https://www.vim.org/download.php#unix in different directories
mkdir -p vim/8 && cd vim/8 git clone https://github.com/vim/vim.git git checkout <myFavorateVim8tag>
and follow build instructions for 8 (Take a look at the README and
.configure --help to get started)
then if you'd like do the same for 7
mkdir -p vim/7 && cd vim/7 git clone https://github.com/vim/vim.git git checkout <myFavorateVim7tag>
The main gotcha is making both accessible, depending on what else is going on you have lots of options, however in this case, since they are primarily interactive programs the cleanest option might be to alias them to different names.