Knowledge for the World

How to Install Vim Plugins Without a Plugin Manager

Vundle, Pathogen, Vim-plug, VAM, and the others can be great time savers but sometimes you just have to do something yourself so you can understand what exactly the time saving software is doing for you in the background. For myself, I got sick of not understanding what these were doing to my system. I realized I did not know the fundamentals of vim plugins so I set out to learn.

This is a step by step guide to teach you how to install a basic vim plugin without the help of any fancy manager.

1

Usually, you will have a .vim directory in your home folder. This is where you should put plugins and syntax files for vim. This is just a convention, however, so feel free to put them wherever you want.

2

This is another convention.

3

If its hosted on Git, this is the place to do the following:

git clone <repository-url>

If its not, that's ok too. However you've obtained it, it will work as long as it follows vim's conventions of file and directory naming.
If its just a single file with a .vim filetype, I recommend creating a directory here and putting the file inside.

4

Now that your plugin is where we want it, we need to tell vim where to find it every time you start it up.
Your runtimepath is where vim looks for scripts, syntax files, plugins and other things to include in your vim environment. Inside vim, you can find your runtimepath with the following command:

:set runtimepath?

To update your runtimepath and load your new plugin, we're going to edit your .vimrc which should be located in your home folder. The syntax to add a directory to your runtime path looks like this:

set runtimepath^=~/.vim/bundle/ctrlp.vim

5

You can call the following command:

:source ~/.vimrc

or just close and restart vim.

6

If you see errors while starting up vim or your plugin just doesn't work, something went wrong. Sometimes vim plugins have dependencies or other installation steps so your mileage may vary.

If you feel differently about this process or have any strong opinions whatsoever, please comment and maybe we'll all learn something!