Home Interests Vim

How to install Vim plugins without a plugin manager

howchoo   (467)
September 8, 2023
5 minutes

Share

You'll Need 1

What you'll need
Interests
Vim x 1
Howchoo is reader-supported. As an Amazon Associate, we may earn a small affiliate commission at no cost to you when you buy through our links.
Posted in these interests:

Vim

vim • 5 guides
webdev • 10 guides

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 – Create or find your .vim directory

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 – Create a ‘bundle’ directory inside the .vim folder.

This is another convention.

3 – Copy your plugin to this directory

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 – Set your vim runtimepath

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 – Reload your vimrc

You can call the following command:

:source ~/.vimrc

or just close and restart vim.

6 – Disclaimer

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!

NEXT UP

Make YouTube Video Embeds Responsive Using Pure HTML and CSS

howchoo   (467)
September 22, 2023

Surprisingly, normal YouTube embeds are not automatically sized to the browser window as it is resized. Luckily, you can make YouTube videos responsive and mobile-friendly with some simple HTML and CSS. 1 – The HTML Wrap your embed code in a unique video wrapper (the class name is arbitrary). I chose to use embed-youtube as the selector.

Continue Reading

howchoo

 467 guides

Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo's writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.

Discover interesting things!

Explore Howchoo's most popular interests.

Explore