[英]vim - how to remove netrw?
I was testing https://github.com/skwp/dotfiles ) and unfortunately it did install a lot of things I do not want. 我正在测试https://github.com/skwp/dotfiles ),不幸的是它确实安装了很多我不想要的东西。
For example, right now (with empty .vimrc) when I open vim I get 例如,当我打开vim时,我现在(使用空的.vimrc)
" ============================================================================
" Netrw Directory Listing (netrw v149)
" /Users/user/.vim/bundle
" Sorted by name
" Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec
" ============================================================================
thing. 事情。 I am in the beginning of my journey with VIM so I don't know what is new and right now I don't want to use it. 我正处于与VIM的旅程之初,所以我不知道什么是新的,现在我不想使用它。
I am on OSX Mavericks with home-brew installed. 我在OSX Mavericks上安装了家庭酿造。 Still, I cannot find where is this coming from and how to remove it. 不过,我无法找到它的来源以及如何删除它。
Look at the first few lines of $VIMRUNTIME/plugin/netrwPlugin.vim
: 查看$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. 到你的vimrc文件。
您可以通过将let g:netrw_banner=0
到.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. 由于netrw的网页建议在更新之前删除旧版本的netrw,我最终找到了与此处发布的答案不同的方法。 This might be especially useful for those of you looking to remove netrw (that is, uninstall netrw) before upgrading: 对于那些希望在升级之前删除netrw(即卸载netrw)的人来说,这可能特别有用:
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 下载https://www.drchip.org/astronaut/vim/vbafiles/netrwclean.vba.gz ,也可以在https://www.drchip.org/astronaut./vim/index的netrw标题下找到。 HTML#NETRW
Open vim and do :so netrwclean.vba.gz
, giving the full path to wherever you saved the file if necessary. 打开vim并执行:so netrwclean.vba.gz
,在必要时提供保存文件的完整路径。
:NetrwClean
to remove user-local copies or :NetrwClean!
:NetrwClean
删除用户本地副本或:NetrwClean!
to remove both user-local and centrally-installed copies of netrw. 删除用户本地和集中安装的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. 请注意,您需要使用正确的系统权限来触摸将要删除的文件,因此您可能希望以root用户身份启动vim。
(Optional) download the new version of the netrw vimball and :so netrw.vba.gz
to update. (可选)下载新版本的netrw vimball并:so netrw.vba.gz
进行更新。
I don't think that this installed Netrw — it comes bundled with Vim. 我不认为这安装了Netrw - 它与Vim捆绑在一起。 You can learn more about Netrw on its page at vim.org . 您可以在vim.org的页面上了解有关Netrw的更多信息。
What you're getting now is (as it says) Netrw's directory listing, which enables you to navigate within a directory from inside Vim. 你现在得到的是(正如它所说的)Netrw的目录列表,它使你能够在Vim内部的目录中导航。
Just remove these files (from your vim installation eg /usr/share/vim/vim74
) and it will be gone 只需删除这些文件(来自您的vim安装,例如/usr/share/vim/vim74
),它就会消失
plugin/netrwPlugin.vim
syntax/netrw.vim
autoload/netrw.vim
autoload/netrwSettings.vim
autoload/netrwFileHandlers.vim
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.