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
- 8,552
Just create it,
mkdir ~/.vim
and then move the plug-in files to said folder.
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.
- 28,567
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.
- 13,475
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.
- 848