Monday, August 31, 2009

Re: Use terminal colors in GUI Vim?

Nathan Neff wrote:

[..]

>>> What does this tell you?
>>>
>>> :echo g:colors_name
>> I'm using "moria" in Gvim. I'd like to make Gvim have the same colors as
>> vim does in my terminal. I don't know how to convert terminal colors
>> into a Gvim color scheme.

> In addition, when I type :echo g:colors_name in terminal vim, I get
> "Undefined variable: g:colors_name", which makes sense because
> g:colors_name only applies to Gvim.

No.

Type the following in terminal vim:

:colorscheme <space> <Tab>

You will be prompted for different color schemes in succession.

Select one by hitting <Enter>

Then:

:echo g:colors_name

The name of the color scheme that you selected is displayed.

My _guess_ is that you are using the "default" color scheme, which I
believe is hard-coded in vim and the trouble is that in this particular
case the colors_name global variable is not se.

I have not looked at the code, so someone correct me if that is not the
case.

So, I'm not sure where you can go from there. Maybe check if there is a
plugin that lets you dump the "default" color scheme to a colorscheme
file..?

Not sure that's even possible.

Obviously, once you have a copy of the "default" color scheme in a file,
porting it to gvim is trivial.

Otherwise, you could start terminal vim, use the :hi command to display
the current syntax highlighting settings, copy/paste them to a file, and
use these definitions to build a gvim color scheme.

Gen_Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

No comments: