1

My system is RHEL 7.5 and the output of vim --version as below:

me@localhost:~/tmp$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug  9 2019 03:17:15)

I want to use vim 8 so I downloaded the source code of vim 8, compiled it and installed it.

Now, when I type which vim, the output is /usr/local/bin/vim, which is exactly what I just intalled.

/usr/local/bin/vim --version showed me

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 17 2020 12:27:50)
Included patches: 1-587
Compiled by me@localhost.localdomain

Everything looks fine.

However, if I execute vim --version, it's still vim 7, instead of vim 8.

Now I'm totally confused.

As my understanding, which vim tells me which command it will use, which vim shows me /usr/local/bin/vim, so why vim --version used another vim (/usr/bin/vim), instead of /usr/local/bin/vim?

Yves
  • 3,291

0 Answers0