Score:0

Why is my Ubuntu 21.10 running nvim instead of vim?

ng flag

I've had 21.10 installed for a while but have noticed that 'vim --version' brings up the info for 'nvim'. Is there any reason why this is happening?

guiverc avatar
cn flag
You didn't say if you are asking about Ubuntu 21.10 Server or Ubuntu 21.10 Desktop or give clues as to *architecture*, but I'd search your `apt` logs for reasons why it was installed (either directly or indirectly; as `neovim` is not installed by default as it's a 'universe' package (`neovim | 0.4.4-1 | impish/universe | source, amd64, arm64, armhf, ppc64el, s390x`) thus ineligible to be on Ubuntu media (see https://cdimage.ubuntu.com/ubuntu/releases/21.10/release/ubuntu-21.10-live-server-arm64.manifest or whatever media you used for your unspecified arch/product)
ng flag
I should have indicated that I was referring to Ubuntu 21.10 only. Once I understood that nvim had been subsequently manually installed, I executed a `apt-get purge neovim` which removed nvim and the links from vim to nvim. Thanks
guiverc avatar
cn flag
Ubuntu 21.10 isn't very specific, eg. I gave the manifest for a 21.10 ISO; a *arm64* server ISO which is an 21.10 ISO (where there are many produced!, desktop, servers, multiple architectures... but none have 'universe' packages enclosed within as Ubuntu only provide Security Team packages from 'main' (some binary only debs etc)
Score:0
cn flag

Neither vim nor neovim are installed by default on an Ubuntu system. By default, Ubuntu comes with a minimal version of Vim through the package vim-tiny.

If on your system, 'vim --version' brings up information on neovim, which is a fork of vim, then it means you once installed neovim (package neovim). During installation, that package will have the commands vi and vim point to nvim (/usr/bin/nvim) using the "debian alternatives" system:

sudo apt install neovim

Setting up neovim (0.4.4-1) ...
update-alternatives: using /usr/libexec/neovim/ex to provide /usr/bin/ex (ex) in auto mode
update-alternatives: using /usr/libexec/neovim/rvim to provide /usr/bin/rvim (rvim) in aut
o mode
update-alternatives: using /usr/libexec/neovim/rview to provide /usr/bin/rview (rview) in 
auto mode
update-alternatives: using /usr/bin/nvim to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/nvim to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/libexec/neovim/view to provide /usr/bin/view (view) in aut
o mode
update-alternatives: using /usr/libexec/neovim/vimdiff to provide /usr/bin/vimdiff (vimdif
f) in auto mode

These links will be set up only if they are not already enabled. For example, if you previously installed vim, the commands vi and vim will continue to point to vim, /usr/bin/vim.basic. By default, the command vim is not available, and vi points to /usr/bin/vim.tiny.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.