开发者

Uninstalling Plugin in Vim

开发者 https://www.devze.com 2023-02-04 06:37 出处:网络
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

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 开发者_JAVA技巧Windows.


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.


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


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


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号