LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How can I set environmental variables of vi editor in ROOT user? (https://www.linuxquestions.org/questions/linux-general-1/how-can-i-set-environmental-variables-of-vi-editor-in-root-user-511767/)

sbnice 12-18-2006 08:56 PM

How can I set environmental variables of vi editor in ROOT user?
 
Hello, friends

I'm new member and I'd like to use this forum. ^^
Does anyone knows how can I set the environmental variables of vi editor on ROOT user?
I use .vimrc for setting vi editor when I logged in my account not root user.
It's fine.
However,
Whenever I logged in root user, my settings are useless such as ':syntax on', ':set ts=4' and etc.
Could you advise me? How can I set it on Root user?

Thank you so much
Sincerely,

SB

frob23 12-18-2006 09:17 PM

You just need to create:

/root/.vimrc

And put the settings you want in there.

If you're feeling particularly brave:

ln -s /home/username/.vimrc /root/.vimrc

And root will share your file. This has security implications though, so I don't recommend it. It's better to just copy it.

sbnice 12-18-2006 10:24 PM

It's Great!!! It's working. Thank you so much~ frob23.
 
Hello, frob23.

Thank you so much. It's working.
It's great!
I like this forum too much.~

See ya~

SB


All times are GMT -5. The time now is 10:50 AM.