0

I had Neovim v0.4 installed via apt (on Ubuntu). But then I saw there is a newer version and tried to install it following instructions here.

Now if I use

./nvim.appimage

from ~/.config/nvim folder, the newest version is run, but if I use

nvim

old version will run.

And if I try to update to newest using apt-get install neovim, I'll get

neovim is already the newest version (0.4.4-1).

Why is this happening and how do I open the latest version directly?

New contributor
Mate Mrše is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
2
  • Try running hash -r in your shell, or starting a new one. Then check which -a nvim/command -v nvim. (Basically: shells cache paths. But this may not be the problem if the installation didn't put links or binaries in the expected places.)
    – D. Ben Knoble
    Mar 18 at 15:23
  • I managed to get it working by following vi.stackexchange.com/questions/25192/….
    – Mate Mrše
    Mar 18 at 15:25

1 Answer 1

1

run the following from the folder where you downloaded nvim.appimage

sudo cp ./nvim.appimage /usr/local/bin/nvim
sudo chmod 755 /usr/local/bin/nvim

the reason ubuntu doesn't execute the newest version if you enter nvim is that nvim.appimage is not in a directory in $PATH. Whenever you enter a command the shell goes through a list of folders to find the program. If it finds it in a directory it stops searching, which in your case is /usr/bin/nvim. /usr/local/bin is also in $PATH, but takes precedence over /usr/bin, so by moving nvim.appimage there you make your shell execute that file instead of the ubuntu provided neovim version.

New contributor
Paper Benni is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

Mate Mrše is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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