I am trying to install different plug-ins in vim. I have installed vim using sudo apt-get install vim
. But the downloaded files for these plug-ins need to be placed in ~/.vim folder. But there is no such folder. I've found a vim folder in /etc and also in /usr/share directories. Which one to use..??
5 Answers
You can copy the plugins in the /etc/vim folder, if you want them to be available for all users:
sudo cp -rv /route/to/nameoftheplugin /etc/vim/
Or, if you only need them for your use, just create the vim directory in your home:
mkdir ~/.vim
Then to open that folder, just type:
nautilus ~/.vim
-
I have copied the plugin files to /etc/vim. The plugin is snipmate. Now when I open a C file the plugin is not working.. :/ Jan 5, 2014 at 14:44
-
You should read the information about how that specific plugin works, maybe you need to unpack it, or give it executable permissions? The plugin should come with some kind of install information. Jan 5, 2014 at 15:35
You need to create the .vim
folder in your home folder. All plugins will go into the ~/.vim/plugins
folder. Your personal initialization options will go into the ~/.vimrc
file.
The following worked for me:
open the vim editor and type :echo $VIMRUNTIME
in my case it was /usr/share/vim/vim74
Go to the plugin
directory inside your runtime directory and copy your plugin file there.
I've copied yaml.vim
for YAML syntax highlighting. Works perfectly fine.
The .vim folder can be found in your Home
directory. The dot(.) at the beginning means the vim folder is hidden. Extract the plugins into the .vim folder for installing the vim plugins.