Uninstalling Plugin in Vim

44,952

Solution 1

If you want to uninstall a plugin which was installed into ~/.vim manually, you should redownload its archive, list its content and manually remove everything, then run :helptags again (this will remove missing tags). If plugin was installed from a vimball, see documentation for :RmVimball. Vimball archives normally have .vba or .vba.gz extensions. In case you don't remember vimball file name, it is contained into ~/.vim/.VimballRecord file.

In order to avoid this problem in the future, try vim-addon-manager plugin. Like pathogen, it puts each plugin into separate directory, but is also capable of downloading, installing and updating them.

Solution 2

To manage easily plugins in vim use pathogen and this awesome article --> come home to vim

Solution 3

If you install vim plugin via Vundle, it's easy to uninstall plugin, comment out the plugin in .vimrc, example:

"Bundle 'tmhedberg/SimpylFold'

then

:BundleClean  

common commands of Vundle: :BundleList -List all plugins
:BundleInstall -Install all plugins
:BundleInstall! -Update all plugins
:BundleSearch foo -Find foo plugin
:BundleSearch! foo -refresh buffer for foo plugin
:BundleClean -clean all plugins if the plugin not defined in .vimrc

Solution 4

You can simply run:

vim +PlugClean

OR open vim and run :PlugClean.

On running this command, it will ask you to remove the plugin directories. answer with y and it will clean the plugs.

Solution 5

Interestingly, even the much downloaded Pathogen.vim documentation boldly suggests (their emphasis, not mine):

For new users, I recommend using Vim's built-in package management instead. :help packages


Ok, I can take a hint, that pathogen is not for most of us new users.

So then looking into native vim packages, and what it has to offer...

The skinny from :help packages seems to be this:

... A package can be downloaded as an archive and unpacked in its own directory.

Thus the files are not mixed with files of other plugins.

That makes it easy to update and remove.

Share:
44,952
Rafid
Author by

Rafid

Software developer with passion. Started learning programming at around 10 years of age. Currently working @ AWS in Vancouver, British Columbia. Aside from my main job, I am trying to spend most of my free days developing my knowledge with Machine Learning. When I have time to spare, I enjoy reading mathematics and physics. When I am bored, I go for a walk or ride my bicycle (when Vancouver weather permits!)

Updated on August 01, 2020

Comments

  • Rafid
    Rafid over 3 years

    After installing many plugins in my ~/.vim folder, I feel I no more understand the contents of that folder and I don't feel enough confidence about deleting the plugin from ~/.vim/plugin to uninstall a plugin. What if there are related files in other directories? What if the documentation was already registered (:helptags), yet the plugin will be removed? Is there any procedure to uninstall vim-plugins? I don't really want my Vim to end up being as messy as my Windows.