Ive just installed ubuntu 16.04.2 32 bit on a digital ocean server.
Digital ocean has tweaked the ubuntu install a bit, for example they have installed full vim as part of the block image they use in their VPS's.
I now want to use this – pre-installed – vim as my default editor. so I run
sudo update-alternatives --config editor
which gives this menu
$ sudo update-alternatives --config editor
There are 4 choices for the alternative editor (providing /usr/bin/editor).
Selection Path Priority Status
------------------------------------------------------------
* 0 /bin/nano 40 auto mode
1 /bin/ed -100 manual mode
2 /bin/nano 40 manual mode
3 /usr/bin/vim.basic 30 manual mode
4 /usr/bin/vim.tiny 10 manual mode
Press <enter> to keep the current choice[*], or type selection number:
note: vim is not there as an option
Im thinking digital ocean has not added the vim install to the update-alternatives system?
What is the recommended way to get the /user/bin/vim
program added to this menu?
I guess I could overwrite the /usr/bin/editor
symlink that the alternatives system adds or maybe add a symlink in /etc/alternatives
pointing to /usr/bin/vim
? but I would like to try the "official" way before I do my "hack" on top of the digital ocean hack.
Best Answer
This is not modified, but the standard Ubuntu behaviour up to Zesty. If you do a
ls -l
onvim
(/usr/bin/vim
), you see that it is a link to/etc/alternatives/vim
, which in turn links to/usr/bin/vim.basic
.Execution of
vim --version
orvim.basic --version
also reveals that they are in fact the same full, "giant"vim
version 8.0 without GUI.To answer your question: Menu choice of
vim.basic
gives you the desired fullvim
version. It is just that the name is misleading.