2

I've the same question as Change GVim Color Scheme to be Like Command Line Vim

I specially like the 'darkblue' scheme on vim (through putty). Can there be some script which changes the darblue color scheme and changes the guibg and guifg to match the values in ctermbg and ctermfg.

Community
  • 1
  • 1
puneet agrawal
  • 343
  • 2
  • 4
  • 13

5 Answers5

2

First you must be aware, maybe you are, that most terminal emulators come with the ability to let the user define a 16 colors default palette. If 256 colors support is not activated explicitely, most - if not all - terminal emulators will default to those 16 colors.

Because each terminal emulator comes with its own default colors and those can be modified by the user there's no way to tell the value of DarkRed or even Black without actually looking at the configuration file or preferences window of your terminal emulator.

Assuming that you are not running in 256 colors mode, you should find where the default/custom colors are defined in your terminal emulator and note their hexadecimal value.

Here is my own colorscheme, in Gnome terminal:

my colorscheme

Once you have all the values, you can make a copy of the colorscheme:

$ cp /usr/share/vim/vim7x/colors/darkblue.vim ~/.vim/colors/darkblue.vim

and change all the guibg and guifg to the values you noted earlier.

Good luck.

romainl
  • 186,200
  • 21
  • 280
  • 313
1

Vivify provides colorschemes that usually support both terminal vim and gvim. Try downloading your scheme there.

desimusxvii
  • 1,094
  • 1
  • 8
  • 10
0

you can use this way...

:colorscheme darkblue

this is worked in the gvim and xterm. if you want to change the command line vim you can use this method. this is same like as the gvim. first you can type :colorscheme then press the tab it will give more color scheme. which you you can set.

Manikandan Rajendran
  • 1,142
  • 1
  • 8
  • 9
  • yes, i can set the colorscheme. But, generally it looks different in gvim and vim(over xterm), as the vim don't support much colors. Though gvim supports more colours, I still like the 'limited color' version of vim, but at the same time i want to use gvim instead on vim. So, want to find a way to match the color scheme of gvim to exactly match that of vim. – puneet agrawal Sep 29 '12 at 14:31
0

Instead of trying to downgrade the GVIM colors to the limited set of terminal colors, I would (assuming you have a "modern" terminal emulator that supports 256 colors) use the CSApprox plugin to get a very close rendition of the GVIM colors in the console, i.e. upgrade the terminal colors.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
0

I'm surprised this isn't up here. There's a plugin called csapprox that does exactly this. The coolest thing is that it does it with no configuration. Just set your colorscheme in your vimrc and it automatically loads the colors correctly in terminal vim. Add it to Vundle:

Bundle 'godlygeek/csapprox'

And restart Vim. The only issue I've found is that sourcing your vimrc breaks it. You'll have to restart vim every time you want to source the vimrc with :so ~/.vimrc.

stonewareslord
  • 343
  • 2
  • 13