سؤال

If this question is not considered to have this place in this forum, tell me I will remove it instantly !

I have installed on my ubuntu a vim plugin (called NERDTree). It works well when I open a file with a non-root status. When I run vim as a root and I try to launch the plugin with :NERDTree, I am told the command 'NERDTree' is unknown. Someone could help ?

هل كانت مفيدة؟

المحلول 2

Did you install the NERDTree plugin in your home ~/.vim/plugins directory? If so, then the root user probably doesn't "see" it. Move it to the global plugins directory and that should fix it.

نصائح أخرى

Plugins placed in /usr/share/vim/vim7x will most likely be overwritten at the next upgrade. If you want your plugins to be available to root you should install them in /root/.vim.

That said, Vim comes by default with a file explorer plugin called netrw. You may try to learn how to use it (:h netrw) before installing any third party replacement.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top