Where is netrw (:Ex)?

After starting with a clean slate and installing Neovim unstable on Ubuntu using the official instructions, I have no Netrw file explorer. When I try :Ex, I get an error:

E492: Not an editor command: Ex

I’ve been using Vim for years on all kinds of systems and I’ve never seen this happen before. Where is Netrw? How do I get Neovim to recognize it?

:Ex works for me.

Do you have the following lines or similar one in your config:

let g:did_load_netrw = 1


vim.g.did_load_netrw = 1

such kinds of configs disable netrw so they are not loaded on startup.

I have no config at all at the moment – this is fresh out of the box. No .vimrc, no ~/.config/nvim, no nothing that I can find.

I guess those runtime files are missing?

Try echo &rtp and see if netrw.vim files are contained in your runtime paths.

Hi @milanglacier - thank you for the filename tip! I found netrw.vim in a couple of places:


However, neither of these actually seems to be in my nvim runtime path … no idea why my fresh install and/or system appears to be so completely hosed here.

Unfortunately, symlinking netrw.vim into my rtp doesn’t resolve the issue:

❯ ls ~/.config/nvim
drwxrwxr-x  - rct 27 Jan 18:49 lua/
drwxr-xr-x  - rct 27 Jan  9:13 plugin/
.rw-rw-r-- 34 rct 25 Jan 11:35 init.lua
lrwxrwxrwx 40 rct 27 Jan 19:23 netrw.vim -> /usr/share/nvim/runtime/syntax/netrw.vim

(Yes, at this point I have some config in ~/.config/nvim, but this problem predates those files so I doubt it’s related.)


You don’t need to make symlinks.

Instead, you should do vim.opt.rtp:prepend("xxx/runtime") (in your lua config).

How do you install the neovim? I am curious why they are not in your
runtime path.

@milanglacier - I will try the vim.otp.rtp:prepend(...) solution you suggest. It’s definitely weird that I need to do something special with the runtime paths on this completely vanilla install.

I’m running Linux Mint:

Linux <hostname> 5.4.0-137-generic #154-Ubuntu SMP Thu Jan 5 17:03:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Since this is Ubuntu under the hood, I followed the instructions installing Neovim on Ubuntu instructions to install the latest (nightly) Nvim.

No idea if it’s Linux Mint that’s messed up all the file paths (haven’t had any issues like this with Mint previously), or something wrong with the PPA install, or what …

I have the same OS and also made the recommended nightly binary install from the GitHub wiki. This doesn’t happen in Vim, just in Neovim. If someone know how to make netrw.vim available again I would appreciate it.

Do you use lazy.nvim & have you disabled “netrwplugin” in lazy.nvim disabled_plugins?