0

I'm trying to switch from gnome-terminal to xterm (which is much faster) but cannot change color palette to solarized. I've found that I need paste all settings in ~/.Xresources and then run xrdb -merge ~/.Xresources. I have the following in my configuration Xterm*color0: #073642 but in vim the color is black as you can see. The whole file:

! xterm*font: *-fixed-*-*-*-14-*
XTerm*termName: xterm-256color
XTerm*loginShell: true
XTerm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48
XTerm*faceName: Ubuntu Mono
XTerm*faceSize: 12
XTerm*foreground: #EBEBEB
XTerm*background: #002B36
! urxvt.color0: #073642
! Xterm*color0: #073642
! Xterm*color15: #073642

#define S_base03        #002b36
#define S_base02        #073642
#define S_base01        #586e75
#define S_base00        #657b83
#define S_base0         #839496
#define S_base1         #93a1a1
#define S_base2         #eee8d5
#define S_base3         #fdf6e3

! XTerm*background:            S_base03
! XTerm*foreground:            S_base0
Xterm*fadeColor:             S_base03
Xterm*cursorColor:           S_base1
Xterm*pointerColorBackground:S_base01
Xterm*pointerColorForeground:S_base1

#define S_yellow        #b58900
#define S_orange        #cb4b16
#define S_red           #dc322f
#define S_magenta       #d33682
#define S_violet        #6c71c4
#define S_blue          #268bd2
#define S_cyan          #2aa198
#define S_green         #859900

!! black dark/light
Xterm*color0:                S_base02
Xterm*color8:                S_base03

!! red dark/light
Xterm*color1:                S_red
Xterm*color9:                S_orange

!! green dark/light
Xterm*color2:                S_green
Xterm*color10:               S_base01

!! yellow dark/light
Xterm*color3:                S_yellow
Xterm*color11:               S_base00

!! blue dark/light
Xterm*color4:                S_blue
Xterm*color12:               S_base0

!! magenta dark/light
Xterm*color5:                S_magenta
Xterm*color13:               S_violet

!! cyan dark/light
Xterm*color6:                S_cyan
Xterm*color14:               S_base1

!! white dark/light
Xterm*color7:                S_base2
Xterm*color15:               S_base3
Evgeniy
  • 756
  • 8
  • 17
  • To run Vim in XTerm with a complex color scheme like Solarized, you don't usually need to make any changes to .Xdefaults. You need to be sure you have $TERM correctly set, and some additional settings in .vimrc. http://stackoverflow.com/questions/9832660/why-dont-most-vim-color-schemes-look-as-nice-as-the-screenshot-when-i-use-them/9833425#9833425 – Michael Berkowski Oct 29 '16 at 21:13
  • I don't use solarized in vim, only in terminal. In vim I have my own color scheme which depends on terminal colors. – Evgeniy Oct 29 '16 at 21:53
  • You should clarify this question then. From the tags and the description specifically mentioning Vim, it would appear you're asking about Vim. – Michael Berkowski Oct 29 '16 at 22:46
  • It does not matter anymore, the problem is gone. I'm not sure why but now all works as expected. I thought this is because there was "Xterm" instead of "XTerm" (I've changed it later) but after replacing nothing was crashed. – Evgeniy Oct 29 '16 at 23:47
  • You probably shouldn't use `-merge`. – romainl Oct 30 '16 at 07:17

0 Answers0