Answer the question
In order to leave comments, you need to log in
Vim plugin only works in sudo. Why is the statusline plugin not showing up in Vim as a regular user?
Editing the configuration file /etc/vimrc.
After writing changes to a file, everything works the same under sudo and under a normal user.
Next, I'm trying to install the vim-airline plugin in vim.
Then I added the vim-airline plugin:
"///Plug\\\
call plug#begin()
Plug 'NLKNguyen/papercolor-theme'
Plug 'vim-airline/vim-airline'
call plug#end()
"Airline settings
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
:PlugInstall
Answer the question
In order to leave comments, you need to log in
Most likely the problem is with the users. Vim launched via sudo
works with the directory /root/.vim
. You will most likely find your plugin there.
For myself, in the root home directory, I made sim links to /home/user/.vim
and /home/user/.vimrc
(where user, username) while preserving the original names. That's how it works. Before creating sim links, you need to delete / rename the source files / directories
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question