vim colors in Putty

1,125 views
Skip to first unread message

madiyaan

unread,
Feb 21, 2008, 7:34:47 PM2/21/08
to vim_use
Hello:

I frequently ssh into a linux machine and use Vim 7.1 there using
Putty. The problem is that for most color schemes vim and gvim's
colors are different. For 256 bit colorschemes like desert256 there
was no perceptible difference, however.

Another annoyance is that colorschemes cannot set the background color
of Putty. Whatever the background color might be, Putty always has a
black background. A lot of the colorschemes look nice when the
background color is set to what they want it to be, but Putty doesn't
allow that.

Has anyone got background color/true colors working for vim (not gvim,
I'm talking about vim) through Putty?

Regards,

Sadarax

unread,
Feb 21, 2008, 10:26:59 PM2/21/08
to vim...@googlegroups.com
On Thu, Feb 21, 2008 at 4:34 PM, madiyaan <ahmad...@gmail.com> wrote:

Hello:

I frequently ssh into a linux machine and use Vim 7.1 there using
Putty. The problem is that for most color schemes vim and gvim's
colors are different. For 256 bit colorschemes like desert256 there
was no perceptible difference, however.

This sounds a trite inane, but do you have all 256 colors enabled in your Putty?

Another annoyance is that colorschemes cannot set the background color
of Putty. Whatever the background color might be, Putty always has a
black background. A lot of the colorschemes look nice when the
background color is set to what they want it to be, but Putty doesn't
allow that.

Has anyone got background color/true colors working for vim (not gvim,
I'm talking about vim) through Putty?

As for setting the background in Putty, I am not sure. I know of some Putty modifications that allow transparent backgrounds, but that is not really what you are asking about.

In the Linux version of Putty (which I believe is essentially the same as the Windows version), you can specify background colors with argument switches as you invoke the program. I used to do this a lot by creating a shortcut on my Windows desktop to Putty and I specified in the target line to the executable file, something like: "C:\Windows\Putty.exe" -load LinuxBox1

I used this to load a saved profile called LinuxBox1 with a set background color, font, keyboard layout, etc.

Putty has arguments for -bg color, -fg color, etc. Take a look at the man page for it. You could use these if you did not want to go as far as creating profiles for it.

-Sadarax

--
How sad it would be to live a life less wonderful, if only because one were afraid of a little hard work. If you shy away from challenges, you shy away from some of the greatest achievements in life.

haron

unread,
Feb 26, 2008, 8:36:56 PM2/26/08
to vim_use

> Has anyone got background color/true colors working for vim (not gvim,
> I'm talking about vim) through Putty?

May be following will be helpfull: using Matt's script:

http://www.cs.drexel.edu/~mjw452/colorschemedegrade.tar.gz

http://groups.google.com/group/vim_use/browse_thread/thread/2bcee5caf6f4a356

I have reached today very nice results with
a) cygwin vim version, (i use puttycyg to work with local cygwin
environment).
b) ssh-ing with putty from WinXP to SuSE 9.3

For cygwin it was just necessary to install additionally gvim cygwin
package and redefine /usr/bin/vim to be softlink to /usr/bin/gvim; vim
on SuSE were already compiled with X11 support. Colorscheme which i
have tested is ps_color, with very nice eye-friendly light-gray
background and very balanced colors. It's looks now very similar to
the GUI colors.

foobie

unread,
Apr 9, 2008, 7:30:02 AM4/9/08
to vim_use
> Has anyone got background color/true colors working for vim (not gvim,
> I'm talking about vim) through Putty?

I found the trick to be "set t_Co=256" in my .vimrc. The colours were
all wrong before and the background wasn't being set, although I found
murphy to be a good colourscheme when broken, but it looks all weird
now it's got the right colours :-)
Reply all
Reply to author
Forward
0 new messages