-1

My vim was installed on debian8 with the apt-get command.

apt-get install vim
$ find / -name 'autoload'
/usr/share/vim/vim74/autoload
$ find  /  -name  '.vim'

The above command can find nothing.

$ ls  /etc/vim
vimrc  vimrc.tiny

Is my vim installed on /usr/share/vim properly?

  • 2
    Well, how did you install it? What's the problem you're trying to solve? – muru Mar 6 '16 at 2:44
  • 1
    To locate the executable you can use which vim but 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 6 '16 at 10:26
  • 1
    dpkg -L vim | grep bin – Christian Brabandt Mar 6 '16 at 10:58
  • 1
    @ChristianBrabandt On ubuntu at least apt and dpkg don't install vim in a single package "vim", its organised as mulitple dependency packages, so dpkg -L vim isn't necessarily going to be useful. e.g. for vim-gtk it doesn't even mention where the $VIMRUNTIME is at all – the_velour_fog Mar 6 '16 at 11:05
  • 2
    @the_velour_fog He did apt-get install vim. So he can see what is installed with the provided command. And yes, on Ubuntu there exists a basic package vim. See apt-cache show vim Yes 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 6 '16 at 11:47
6

You are not supposed to do anything with the default runtime so where Vim was installed doesn't matter.

Whatever customization you want to do, do it in $HOME.

3

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.

  • What makes you say the fhs isn't followed on Debian and Ubuntu Vim? – muru Mar 6 '16 at 13:28
  • @muru I mis-spoke. My first impression after seeing the bulk of the files were in /usr/share/vim/vim74 in a "monolithic" configuration - was they weren't following FHS. But I guess because vim's code is architecture independent? its following FHS after all? I have edited answer as I dont actually know that answer to that. – the_velour_fog Mar 6 '16 at 13:50
1

apt-file can do it. To install use:

apt-get install apt-file

Then use the following:

apt-file list vim

apt-file lists file names in all packages, whether they are installed or not.

Your Answer

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.