5

I was testing https://github.com/skwp/dotfiles) and unfortunately it did install a lot of things I do not want.

For example, right now (with empty .vimrc) when I open vim I get

" ============================================================================
" 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.

I am on OSX Mavericks with home-brew installed. Still, I cannot find where is this coming from and how to remove it.

Rosmarine Popcorn
  • 10,761
  • 11
  • 59
  • 89
acid
  • 2,099
  • 4
  • 28
  • 41
  • 4
    netrw comes bundled with vim. It typically opens up when you edit a directory. e.g. `vim ~/.vim/bundle`. I think it is nice that you want to start your vim journey with a blank slate however netrw is bundled with vim so disabling it would be removing a core feature. – Peter Rincker Feb 10 '14 at 20:36
  • 4
    That's a typical problem with distributions like the one you installed. Newcomers think they can cut corners and avoid "wasting" too much time on learning and configuration but they end up with a huge mess they have no clue about, built-in stuff included. Remove the crap that you installed and start again from scratch. Also, how do you start Vim? What you see is normal if you do `$ vim .` or `$ vim /path/to/dir`. – romainl Feb 10 '14 at 22:04
  • 1
    The only right answer here is the first comment of @PeterRincker and nothing more... – Timur Fayzrakhmanov Oct 25 '15 at 18:15

5 Answers5

31

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.

benjifisher
  • 5,054
  • 16
  • 18
4

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

BamBam22
  • 582
  • 10
  • 19
2

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.

koyae
  • 720
  • 7
  • 12
0

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.

Ben Klein
  • 1,719
  • 3
  • 18
  • 41
-3

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

nvim:

share/nvim/runtime/autoload/netrw_gitignore.vim
share/nvim/runtime/autoload/netrw.vim
share/nvim/runtime/autoload/netrwFileHandlers.vim
share/nvim/runtime/autoload/netrwSettings.vim
share/nvim/runtime/syntax/netrw.vim
share/nvim/runtime/doc/pi_netrw.txt
share/nvim/runtime/plugin/netrwPlugin.vim
Good Pen
  • 625
  • 6
  • 10
mihai
  • 37,072
  • 9
  • 60
  • 86
  • 1
    If you do this, you will not be able to get it back without tracking down the files that you removed. OTOH, it will come back when you upgrade to the next version of vim. – benjifisher Feb 13 '14 at 12:06
  • well, I answered your question, didn't I? :) just rename them to `*.vim.bkp` if you wish. When a new Vim is released, you need to do this again, indeed. Hopefully that won't happen for a few years now. – mihai Feb 13 '14 at 15:01