4

I recently setup my laptop with Xubuntu 13.04 and after installing and setting up all my dotfiles, which have previously worked fine with Ubuntu 13.04 with XFCE installed, my colorscheme in Vim is using the wrong colors.

I dropped the terminalrc file from the Solarized repository in ~/.config/xfce4/terminal/terminalrc and setup my dotfiles (which can be found at http://github.com/davejlong/dotfiles).

Here is a screen shot of my Temrinal when I open a file in Vim: enter image description here

Here is the contents of ~/.config/xfce4/terminal/terminalrc:

[Configuration]
ColorCursor=#0f0f49499999
ColorForeground=#838394949696
ColorBackground=#00002b2b3636
ColorPalette1=#070736364242
ColorPalette2=#dcdc32322f2f
ColorPalette3=#858599990000
ColorPalette4=#b5b589890000
ColorPalette5=#26268b8bd2d2
ColorPalette6=#d3d336368282
ColorPalette7=#2a2aa1a19898
ColorPalette8=#eeeee8e8d5d5
ColorPalette9=#00002b2b3636
ColorPalette10=#cbcb4b4b1616
ColorPalette11=#58586e6e7575
ColorPalette12=#65657b7b8383
ColorPalette13=#838394949696
ColorPalette14=#6c6c7171c4c4
ColorPalette15=#9393a1a1a1a1
ColorPalette16=#fdfdf6f6e3e3
Term=xterm-256color
FontName=Inconsolata Medium 12
MiscAlwaysShowTabs=FALSE
MiscBell=FALSE
MiscBordersDefault=TRUE
MiscCursorBlinks=FALSE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
MiscDefaultGeometry=80x24
MiscInheritGeometry=FALSE
MiscMenubarDefault=TRUE
MiscMouseAutohide=FALSE
MiscToolbarDefault=FALSE
MiscConfirmClose=TRUE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=TRUE
MiscTabPosition=GTK_POS_TOP
MiscHighlightUrls=TRUE
MiscScrollAlternateScreen=TRUE
5
  • Have you checked in the terminal's color preferences to see if you can spot this gray color which 'uglifies' your colorscheme? I also notice that in your .vimrc you've used set background=dark, I don't think that goes well with Xfce4 terminal (nor with the Solarized terminalrc file).
    – edwin
    Jul 2, 2013 at 1:41
  • I added terminalrc to the question. I also tried removing set background=dark and the light version of solarized seems to work fine when I do that. However since my terminalrc uses dark solarized, I'd like to use dark solarized in vim.
    – Dave Long
    Jul 2, 2013 at 2:01
  • If I am interpreting correctly, then you just need to add set background=dark to your .gvimrc (and not in .vimrc). That way both the terminal (via terminalrc) and GVim will use the dark solarized theme. Also, looks like terminalrc is not the problem.
    – edwin
    Jul 2, 2013 at 2:05
  • That is incorrect. If I have in .vimrc simply set colorscheme=solarized then in terminal vim the light colorscheme will be used. It won't use the terminalrc colors.
    – Dave Long
    Jul 2, 2013 at 3:07
  • Yes, but remember that the CLI interface has the constraint imposed by the limited colors available on the terminal palette. In particular, setting colorschemes on the CLI won't be as pleasant as in the GUI (which can define its own colors). Please check in the terminal preferences if that gray color is set in the palette. I have xfce4-terminal and my terminalrc is almost the same as yours, main differences are the Term and colors 5 (#20205b5b9292) and 15 (#00004f1faf2a).
    – edwin
    Jul 2, 2013 at 15:09

1 Answer 1

6

In the version of xfce4-terminal on Raring you should set this variable in your terminalrc:

ColorPalette=#073642;#dc322f;#859900;#b58900;#205b92;#d33682;#2aa198;#eee8d5;#002b36;#cb4b16;#586e75;#657b83;#839496;#6c71c4;#004fae;#fdf6e3

Please append this line to your terminalrc and see if it works. Apparently the xfce4-terminal devs are changing the syntax for terminalrc. (Notice most of this colors are "half" of the numbered ones).

Here are the contents of my terminalrc. (First notice I am using Anonymous Pro for my font, change the corresponding line to use your favorite font.)

[Configuration]
TitleMode=TERMINAL_TITLE_REPLACE
MiscAlwaysShowTabs=FALSE
MiscBell=FALSE
MiscBordersDefault=TRUE
MiscCursorBlinks=TRUE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
MiscDefaultGeometry=81x24
MiscInheritGeometry=FALSE
MiscMenubarDefault=TRUE
MiscMouseAutohide=FALSE
MiscToolbarsDefault=FALSE
MiscConfirmClose=TRUE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=TRUE
MiscTabPosition=GTK_POS_TOP
MiscHighlightUrls=TRUE
FontName=Anonymous Pro 12
ColorCursor=
ColorForeground=#838394949696
ColorBackground=#00002b2b3636
ColorPalette=#073642;#dc322f;#859900;#b58900;#205b92;#d33682;#2aa198;#eee8d5;#002b36;#cb4b16;#586e75;#657b83;#839496;#6c71c4;#004fae;#fdf6e3
2
  • Looks like adding the ColorPalette line worked. Could you send me the full contents of your terminalrc file? I'm seeing some weird colors on the cursor and other places and wanted to see what you have.
    – Dave Long
    Jul 2, 2013 at 19:49
  • I'll edit my answer right away, glad I could help :)
    – edwin
    Jul 2, 2013 at 21:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .