What are the differences between the different vim packages available in Ubuntu?
The difference between vim-gtk
and vim-gnome
has been discussed here.
Ubuntu usually offers more than these two options for vim, e.g.:
vim-nox
vim-athena
-
vim-*
It is not clear which vim
package have which dependecies and which one is preferable to use on one's system. I keep my vim
configuration files (~/.vim
folder) on GitHub and clone it on any system I have to work on. They work with vim-gnome
but will they work with any of these distributions?
Can we have the major differences listed out between all of the possible vim
candidates available on Ubuntu so one can make an informed decision?
Solution 1:
Including the vim
package, there appear to be at least six "vim-variants" (not including available documentation, or plugin packages) as well as the main vim
package in both the main
and universe
repositories.
Below is a brief summary of each (links go to package description and dependencies in Ubuntu LTS release 20.04 "Focal"):
- vim
Vim compiled and set up with a rather standard set of features. This package does not provide a GUI version of Vim or scripting language support. See the other vim-* packages if you need more (or less).
In order to install this package, run sudo apt-get install vim
- jvim-canna - Japanized VIM (Canna version)
This package allows the entering of Kanji from the console.
In order to install this package, run sudo apt-get install jvim-canna
Depends upon the libcanna1g
library
Does not appear to support Perl, Python, Ruby, or TCL scripting.
-
vim-athena - enhanced vi editor - compiled with an Athena GUI
This package is compiled with the Athena GUI as opposed to GTK+ or Gnome.
See this askubuntu answer for additional details.
In order to install this package, run
sudo apt-get install vim-athena
Supports Perl, Python, Ruby, and TCL scripting.
-
vim-gnome/vim-gtk3 - enhanced vi editor - compiled with a GNOME GUI (GTK2 before 17.10, GTK3 from 17.10)
In order to install this package, run
sudo apt-get install vim-gnome
Depends upon the
libgnome2
librarySupports Perl, Python, Ruby, and TCL scripting.
-
vim-gtk - enhanced vi editor - compiled with the GTK2 GUI
Used in KDE/Kubuntu-like environments
In order to install this package, run
sudo apt-get install vim-gtk
Supports Perl, Python, Ruby, and TCL scripting.
-
vim-nox - enhanced vi editor
Like vim-tiny, vim-nox is a minimal vim installation and does not have a GUI. It comes with mouse support, but no clipboard support, IIRC.
In order to install this package, run
sudo apt-get install vim-nox
Supports Perl, Python, Ruby, and TCL scripting.
-
vim-tiny - enhanced vi editor - compact version
vim-tiny is included as the default vim on Ubuntu distributions and comes with many optional features disabled(e.g. multi-level undo).
See this askubuntu answer for details on its feature set(or lack thereof).
In order to install this package, run
sudo apt-get install vim-tiny
Does not support Perl, Python, Ruby, or TCL scripting.
As close to being vi without being vi.
Locally, to see which features are supported in a particular installed vim package, running the following command: vim --version
will provide a list of features included(or excluded) in the particular package.
For example, on my system I can run either vim --version
, vim.tiny --version
, or vim.athena --version
to see the differences in their respective supported features. The Debian/Ubuntu /etc/alternatives
system determines which vim package executes when you runvi
or vim
, see What is etc/alternatives used for?
Python support
Before 16.04, the above packages (other than vim-tiny
) included Vim with scripting support for Python 2. In 16.04, they all support Python 3, and there are corresponding *-py2
packages (vim-gnome-py2
, for example) which provide a Vim command with Python 2 support. Both can be installed together, and the commands will be, for example, vim.gnome
and vim.gnome-py2
respectively. Otherwise, the *-py2
packages provide the same feature set as the corresponding packages. Python 2 support was removed after 16.04.