Reputation: 2076
Can I load netrw after loading Vim with vim -u NONE
?.
I've considered statements such as
:set nocp
:set filetype on
:set filetype plugin on
:let g:loaded_netrw=1
:let g:loaded_netrwPlugin=1
:h netrw-start
I realize I could make for instance some ~/.minimal-vimrc-netrw
, but wondering if there's a way to enable "manually".
Upvotes: 4
Views: 652
Reputation: 1181
Putting
let g:loaded_netrw=1
in your .vimrc tells netrw.vim not to load as its been loaded already. Of course, it hasn't been loaded -- but that statement is telling netrw.vim not to load (ie. finish early).
Likewise, putting
let g:loaded_netrwPlugin=1
is telling netrwPlugin.vim not to load.
As an alternative,btw, to the runtime call: you may useso $HOME/.vim/plugin/netrwPlugin.vim
(or use vimfiles if you're on windows). The runtime call uses a search on the runtimepath (which is probably better, but just thought I'd point this out).
Upvotes: 0
Reputation: 31419
Run
runtime plugin/netrwPlugin.vim
This will search for the first instance of plugin/netrwPlugin.vim
in your runtime path and source the file.
Upvotes: 8