Where is my vim installed?
If you installed through apt the following sequence should get you to the Vim installation.
From inside Vim,
:echo $VIMRUNTIME
/usr/share/vim/vim74
You could look in here and you would discover the Vim files, but if you wanted a more programmatic, portable approach, you could then use dpkg i.e.
dpkg -S, -- search for file owner:
this tells you which .deb package/s are responsible for the path /usr/share/vim/vim74.
$ dpkg -S /usr/share/vim/vim74
vim-tiny, vim-runtime, vim-common: /usr/share/vim/vim7
These are the packages, so you can use dpkg --list-files to tell you where all the files belonging to the packages are. For example, if you run
dpkg --list-files vim-runtime
you'll get a dump of file names, which will tell you where the bulk of the vim installation is.
You'll see that on Debian and Ubuntu, most of Vim's files are in /usr/share/. 1
1folder for architecture independent files as per the Filesystem Hierarchy Standard.
which vimbut muru is right when he asks what problem are you trying to solve. You should edit your question and give more details about that. – statox Mar 06 '16 at 10:26dpkg -L vim | grep bin– Christian Brabandt Mar 06 '16 at 10:58aptanddpkgdon't install vim in a single package "vim", its organised as mulitple dependency packages, sodpkg -L vimisn't necessarily going to be useful. e.g. forvim-gtkit doesn't even mention where the$VIMRUNTIMEis at all – the_velour_fog Mar 06 '16 at 11:05apt-get install vim. So he can see what is installed with the provided command. And yes, on Ubuntu there exists a basic package vim. Seeapt-cache show vimYes there are other vim flavor packages. Then one should check which package was installed and can use that package name instead of vim in the above command. – Christian Brabandt Mar 06 '16 at 11:47