See color file xterm16


If you have received the message in error, please advise the sender by reply 
email and please delete the message.  This message contains information which 
may be confidential or otherwise protected.  Unless you are the addressee (or 
authorized to receive for the addressee), you may not use, copy, or disclose to 
anyone the message or any information contained in the message.

Sent from Divide on Galaxy Note III

On May 25, 2015 4:13:55 AM, Michael Darling <[email protected]> wrote:

I'd like to have vim in graphical mode handle colors (default fg/bg color, 
syntax highlighting) handle it the same as in color terminal mode.

What's the easiest way to do this?  Is there an option, or do I need to change 
my local source?

Where is the code that vim either grabs a cterm of gui color?  I want to set it 
so in gui mode, it grabs the cterm color instead.

I figure this would either be in src/syntax.c, or src/eval.c.

src/syntax.c::highlight_has_attr() uses modec of 'g' for GUI, 'c' for cterm, 
't' for (no color) term.  But, it's just returning if the given attribute 
exists, so it's not what I'm looking for.

src/syntax.c::highlight_color() is where I was sure I found what I needed.  It 
also uses modec, and has code like if(modec == 'g') ... color = HL_TABLE()[id - 
1].sg_gui_fg; ... if(modec == 'c') ... n = HL_TABLE()[id - 1].sg_cterm_fg - 1;

But, I can make the first command in highlight_color() be "exit(0)" and vim 
works just fine in cli or graphical mode.


Ultimately, with the same .vimrc in vim or "vim -g"/"gvim", I just want it to 
look the same.  I'm fine losing the #xxxxxx color ability.  256 colors is fine 
for me.


I've thought about changing the hard-coded and color/*.vim files, removing 
everything gui*= and duplicating the cterm*=.  Perhaps that's an easier way to 
go than changing source.  I figured there would be a "if gui use gui_fg, else 
if cterm use cterm_fg".

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to