I recently installed VIM 8.0 on my Ubuntu 14.04 machine. When I open vim, it outputs an error:
> vim ~/.vimrc Error detected while processing /usr/local/share/vim/vim80/syntax/syncolor.vim: line 36: E254: Cannot allocate color Orange1 E254: Cannot allocate color Orange1 Press ENTER or type command to continue
When I hit enter, it opens without syntax highlighting (but with a colorscheme, the colors change slightly if I change :colorscheme to something different).
But if I run as root, it opens with syntax highlighting.
sudo vim ~/.vimrc
I assumed it was a permission issue, so I set syncolor.vim to be readable by all:
> ll /usr/local/share/vim/vim80/syntax/syncolor.vim -rwxrwxrwx 1 root root 4.0K Dec 22 23:29 /usr/local/share/vim/vim80/syntax/syncolor.vim
Still no luck. Then I wondered if vim was set to something different under root than under my user:
> which vim /usr/local/bin/vim > /usr/local/bin/vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 22 2016 23:01:25) > sudo which vim /usr/local/bin/vim > sudo /usr/local/bin/vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 22 2016 23:01:25)
My next thought was that root's TERM was different:
> echo $TERM xterm-256color > sudo echo $TERM xterm-256color
I'm at a loss. What else could be different between my user and root that would cause colors not to load?
Update: Under both root and my own user:
:echo $MYVIMRC /home/aaron/.vimrc