K
K
Konstantin2014-09-05 14:57:12
linux
Konstantin, 2014-09-05 14:57:12

How to set vimrc file settings for sudo login?

I work with Centos 6.5_x86. Disabled login as root, enabled my user. Created ~/.vimrc file in both home directories

syntax on
set number

vim displays the color scheme and line numbering everywhere, but if I go through sudo, vim opens with empty settings.
I suspect that the sudo directory must be somewhere ..

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2014-09-06
@fallen8rwtf

what does sudo mean?
sudo -s - will pick up the user environment under which they were originally.
sudo -i - will apply the environment of the user to which you are elevating privileges. That is the environment of the root.
Choose whichever is more convenient for you.

V
Vladimir, 2014-09-05
@rostel

/etc/vimrc
/root/.vimrc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question