Replacing dark blue with light blue in Vim

4,290 views
Skip to first unread message

Jean Johner

unread,
Aug 15, 2010, 2:53:17 PM8/15/10
to mintty
Hello,
Probably an overasked question (I had not the patience to look in all
threads):

Using Mintty with default colors (black background), the dark blue in
Vim is not readable.
How to change it to the light blue used in Windows command prompt Vim.

Best regards

Jean Johner

PS: I just downloaded Mintty 0.8.1. I appreciate:
- default copy on select
- possible thicker cursor
Thank you Andy.

Andy Koppe

unread,
Aug 15, 2010, 3:06:56 PM8/15/10
to mintty
On Aug 15, 7:53 pm, Jean Johner wrote:
> Hello,
> Probably an overasked question (I had not the patience to look in all
> threads):
>
> Using Mintty with default colors (black background), the dark blue in
> Vim is not readable.
> How to change it to the light blue used in Windows command prompt Vim.

If you're referring to the colour used for comments in vim's syntax
highlighting, you can cure it by sticking this into .vimrc:

hi comment ctermfg=blue

If you want to globally change ANSI blue, there's an xterm control
sequence for that:

echo -ne '\e]4;4;#0000FF\a'

Or if you're feeling adventurous you could build mintty off svn trunk,
where you can stick something like this into ~/.minttyrc:

Blue=0,0,255

Andy

Jean Johner

unread,
Aug 16, 2010, 5:06:06 AM8/16/10
to mintty
On Aug 15, 9:06 pm, Andy Koppe <andy.ko...@gmail.com> wrote:
>
> If you're referring to the colour used for comments in vim's syntax
> highlighting, you can cure it by sticking this into .vimrc:
>
> hi comment ctermfg=blue
>
> If you want to globally change ANSI blue, there's an xterm control
> sequence for that:
>
> echo -ne '\e]4;4;#0000FF\a'
>
> Or if you're feeling adventurous you could build mintty off svn trunk,
> where you can stick something like this into ~/.minttyrc:
>
> Blue=0,0,255
>
> Andy

Thank you, I am going to look at that in detail.

Best regards,

Jean Johner

Andrew Aylett

unread,
Aug 16, 2010, 4:28:32 PM8/16/10
to mintty-...@googlegroups.com
On 15/08/10 20:06, Andy Koppe wrote:
> On Aug 15, 7:53 pm, Jean Johner wrote:
>> Hello,
>> Probably an overasked question (I had not the patience to look in all
>> threads):
>>
>> Using Mintty with default colors (black background), the dark blue in
>> Vim is not readable.
>> How to change it to the light blue used in Windows command prompt Vim.
> If you're referring to the colour used for comments in vim's syntax
> highlighting, you can cure it by sticking this into .vimrc:
>
> hi comment ctermfg=blue

You might also be interested in the `background` setting -- it controls
the default colour scheme (telling vim what the background is like, not
setting the background colour), using darker colours if set to "light"
(which is often the default) and lighter colours if set to "dark", and
it's usually the comment colour which drives me to change it when I'm
editing on someone else's machine :).

set background=dark

- Andrew

Andy Koppe

unread,
Aug 18, 2010, 2:15:30 AM8/18/10
to mintty
Neat!

Shame vim doesn't detect the correct setting automatically, using the
xterm control sequences for enquiring about colour values.

Andy

Dono

unread,
Oct 14, 2010, 2:24:53 PM10/14/10
to mintty
You can try this. It worked great for both the terminal font and vim.

# Hack for ANSI Blue color 12 and color 4 in mintty
# ANSI colours can already be changed using the Linux "set palette"
escape sequence:
#
# ESC ] P nrrggbb
# echo -e "\e]P3FF0000"
#
# The lowercase letters are hexadecimal digits, with n for the ANSI
color number and rr, gg, and bb for the red, green and blue
components.

# Color Hex Value
# ===================
# color0 0
# color1 1
# color2 2
# color3 3
# color4 4
echo -e "\e]P46495ED"
# color5 5
# color6 6
# color7 7
# color8 8
# color9 9
# color10 a
# color11 b
# color12 c
echo -e "\e]Pc6495ED"
# color13 d
# color14 e
# color15 f

korey....@gmail.com

unread,
Dec 26, 2012, 10:58:12 AM12/26/12
to mintty-...@googlegroups.com, jean....@cea.fr
Here's a simple solution that just worked for me on Linux (cygwin should be nearly the same).  It's pretty much just copying and modifying your very own vim color scheme.

1) Go to /usr/share/vim/vim73/colors directory (or where ever your vim color schemes directory is).
2) Copy default.vim to mynewscheme.vim
3) Edit mynewscheme.vim and add the line "highlight Comment ctermfg=Blue" to the bottom of the file
4) Add the line "colorscheme mynewscheme.vim" to your ~/.vimrc

Alternatively, there may be an existing color scheme file in that directory that works for you.  Try them all! 

--
Korey Pelton

Reply all
Reply to author
Forward
0 new messages