vim - how to remove netrw?

隐身守侯 提交于 2019-12-05 13:22:09

Look at the first few lines of $VIMRUNTIME/plugin/netrwPlugin.vim:

" Load Once: {{{1
if &cp || exists("g:loaded_netrwPlugin")
 finish
endif

If you want to disable it, just add

let loaded_netrwPlugin = 1

to your vimrc file.

You can remove the commented section by adding let g:netrw_banner=0 to your .vimrc

Since netrw's pages recommend removing older versions of netrw before updating it, I wound up finding a different way from the answers posted here. This might be especially useful for those of you looking to remove netrw (that is, uninstall netrw) before upgrading:

  1. Download https://www.drchip.org/astronaut/vim/vbafiles/netrwclean.vba.gz, which can also be found under the netrw heading at https://www.drchip.org/astronaut./vim/index.html#NETRW

  2. Open vim and do :so netrwclean.vba.gz, giving the full path to wherever you saved the file if necessary.

  3. :NetrwClean to remove user-local copies or :NetrwClean! to remove both user-local and centrally-installed copies of netrw. Note of course that you'll need the right system-privileges to touch the files that will be removed, so you may wish to start vim as root.

  4. (Optional) download the new version of the netrw vimball and :so netrw.vba.gz to update.

I don’t think that this installed Netrw — it comes bundled with Vim. You can learn more about Netrw on its page at vim.org.

What you’re getting now is (as it says) Netrw’s directory listing, which enables you to navigate within a directory from inside Vim.

Just remove these files (from your vim installation e.g. /usr/share/vim/vim74) and it will be gone

plugin/netrwPlugin.vim
syntax/netrw.vim
autoload/netrw.vim
autoload/netrwSettings.vim
autoload/netrwFileHandlers.vim
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!