How can I make the vimdiff command use the same Vim version as the vi and vim commands?
0
votes
2
answers
1028
views
I've never worried about
vimdiff
on my own computer, where I have archlinux installed, so everything is up-to-date, generally speaking; I generally just used it, and I'm fine with it. After all, :version
gives the same output whether I launch vi
, or vim
, or vimdiff
.
On my work computer (Debian 10), however, vimdiff
opens an older version of Vim than vi
or vim
.
I guess this has to do possibly with how I installed Vim and/or with /etc/alternatives
or something. It's been a long time I played around with such stuff though (without truly understanding it, likely), so I don't remember much.
---
**Feedback on [the answer](https://unix.stackexchange.com/a/695929/164309)** and comment(s)
ls -lF /etc/alternatives/ | grep bin/vim | sed 's/.*-> //' | sort -u
rsults in just in one result, namely /usr/bin/vim.gtk*
. How is it possible, then, that vimdiff
and vim
open different versions? Or have I misunderstood the answer?
The output of type -a vimdiff
is
vimdiff is /usr/bin/vimdiff
vimdiff is /bin/vimdiff
output of: type -a vim
vim is aliased to `/home/me/vim-dist/bin/vim'
vim is /usr/bin/vim
vim is /bin/vim
output of type -a vi
:
vi is aliased to `/home/me/vim-dist/bin/vim'
vi is /usr/bin/vi
vi is /bin/vi
Both /bin/vim --version | head -n 1
and /usr/bin/vim --version | head -n 1
have the same output:
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 15 2019 16:41:15)
and that's the version that runs when I execute vimdiff
, older than the one that runs when I execute vim
/vi
.
Asked by Enlico
(2258 rep)
Mar 18, 2022, 09:52 AM
Last activity: Mar 18, 2022, 08:09 PM
Last activity: Mar 18, 2022, 08:09 PM