I installed colorscheme "jellybeans" for Vim. Why does the colors look differently when I run Vim with and without sudo?
Example on the screen below - the left one is without sudo, the right is with sudo. The one with sudo is working properly - how can I make Vim to have the same colors without using sudo?
I use
Linux Mint 17.2 (x64)
gnome-terminal 3.6.2
bash 4.3.11
tmux 1.8
Vim 7.4
The value of my $TERM
variable is:
$TERM=screen-256color
And the result is the same with sudo $SHELL -c 'echo $TERM'
Here is my vimrc file.
EDIT - SOLUTION:
Colorscheme file was lacking read permission for "others". Fixed with:
sudo chmod +r /usr/share/vim/vim74/colors/jellybeans.vim
sudo echo $TERM
will always print the same value asecho $TERM
- the variable is expanded beforesudo
comes into play. What doessudo $SHELL -c 'echo $TERM'
say? How did you install the colour scene? And you should usesudoedit
instead ofsudo vim
.sudo $SHELL -c 'echo $TERM'
gives me the same value of "screen-256color". I installed the colorscheme by copyingjellybeans.vim
file into the folder/usr/share/vim/vim74/colors
. Thank you forsudoedit
tip.sudo vim
loads my local .vimrc because i deleted root's .vimrc and all my plugins/keys work as the should. I triedsource /home/kossak/.vimrc
but it doesn't change anything.