Seth Fitzsimmons
Seth Fitzsimmons

Reputation: 437

How do I remap ANSI colors in a graphical vim?

I'd like to use Conque with MacVim to have a terminal within my editor. Ok, fine. However, the default values for many ANSI colors are difficult to read (especially the dark blue). Within Terminal and iTerm, I'm able to remap the colors to something more readable (using Solarized, for example). I've configured MacVim with a nice colorscheme for editing, but ANSI colors in Conque sessions are their unreadable ANSI selves.

Is there a way to remap ANSI colors (in either MacVim or Conque) to custom colors? I.e., ANSI dark blue should be displayed as #268bd2.

Upvotes: 1

Views: 465

Answers (2)

Seth Fitzsimmons
Seth Fitzsimmons

Reputation: 437

Conque includes a parser for escape sequences in its Python code. I wound up modifying autoload/conque_term/conque_globals.py to change the guifg/guibg values to my taste. The relevant commit is here: https://github.com/mojodna/vim-conque/commit/3b9c43e49a0b120f318fe99a382846d9bf344dc2

Upvotes: 1

romainl
romainl

Reputation: 196476

I have these lines in my ~/.bashrc on my Ubuntu PC at home. It changes the color values used by the virtual console to the ones I use in Gnome-Terminal for consistancy.

if [ "$TERM" = "linux" ]; then
    echo -en "\e]P0202020" #black
    echo -en "\e]P8404040" #darkgrey
    echo -en "\e]P1952743" #darkred
    echo -en "\e]P9CA5F5E" #red
    echo -en "\e]P280A572" #darkgreen
    echo -en "\e]PA99D699" #green
    echo -en "\e]P3E0BC93" #brown
    echo -en "\e]PBFDDFAE" #yellow
    echo -en "\e]P45A667F" #darkblue
    echo -en "\e]PC7989AD" #blue
    echo -en "\e]P594738C" #darkmagenta
    echo -en "\e]PDDCA0DC" #magenta
    echo -en "\e]P67BA0C2" #darkcyan
    echo -en "\e]PEA5C4E0" #cyan
    echo -en "\e]P7D2D2D2" #lightgrey
    echo -en "\e]PFFDF6E3" #white
    clear #for background artifacting
fi

Maybe you can use it as a starting point.

echo -en "\e]PFFDF6E3" #white
               ^^^^^^
               the hexadecimal value

Upvotes: 0

Related Questions