Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
change display colors. which rule causes which color?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gelonida N  
View profile  
 More options Oct 1 2012, 6:33 pm
From: Gelonida N <gelon...@gmail.com>
Date: Tue, 02 Oct 2012 00:32:17 +0200
Local: Mon, Oct 1 2012 6:32 pm
Subject: change display colors. which rule causes which color?
I'm having terminal-windows with dark backgrounds.

The problem is, that all dark blue colors are very difficult to recognize.

Ideally I'd like to change all dark blue vim colors into a lighter blue
or another color.

My Questions:

Is there an easy way to globally change one color with another.

Alternatively.

If I see something in a color, that I don't like.

Is there any way to place my cursor on the 'badly' coloured word and
find out which rule set the color for that word?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gelonida N  
View profile  
 More options Oct 1 2012, 6:35 pm
From: Gelonida N <gelon...@gmail.com>
Date: Tue, 02 Oct 2012 00:32:35 +0200
Local: Mon, Oct 1 2012 6:32 pm
Subject: change display colors. which rule causes which color?
I'm having terminal-windows with dark backgrounds.

The problem is, that all dark blue colors are very difficult to recognize.

Ideally I'd like to change all dark blue vim colors into a lighter blue
or another color.

My Questions:

Is there an easy way to globally change one color with another.

Alternatively.

If I see something in a color, that I don't like.

Is there any way to place my cursor on the 'badly' coloured word and
find out which rule set the color for that word?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
richard emberson  
View profile  
 More options Oct 1 2012, 7:00 pm
From: richard emberson <richard.ember...@gmail.com>
Date: Mon, 01 Oct 2012 16:00:26 -0700
Local: Mon, Oct 1 2012 7:00 pm
Subject: Re: change display colors. which rule causes which color?
To see the "group" I use:

map <F10> :echo "hi<"
synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>

To see the colors associated with a group use:

:highlight "groupname"

I also have a color chooser
https://github.com/megaannum/forms/blob/master/images/examples_colorc...

which is part of the Forms library:
https://github.com/megaannum/forms
http://www.vim.org/scripts/script.php?script_id=4150

and a color schemer viewer (built on top of Forms)
https://github.com/megaannum/colorschemer
http://www.vim.org/scripts/script.php?script_id=4240

Richard

On 10/01/2012 03:32 PM, Gelonida N wrote:

--
Quis custodiet ipsos custodes

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gelonida N  
View profile  
 More options Oct 2 2012, 4:13 am
From: Gelonida N <gelon...@gmail.com>
Date: Tue, 02 Oct 2012 10:12:07 +0200
Local: Tues, Oct 2 2012 4:12 am
Subject: Re: change display colors. which rule causes which color?
On 10/02/2012 01:00 AM, richard emberson wrote:
> To see the "group" I use:

> map <F10> :echo "hi<"
> synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>

> To see the colors associated with a group use:

> :highlight "groupname"

Thanks a lot for this tip.
This helps me to identify the groups, that are tricky to visualize.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dominique Pellé  
View profile  
 More options Oct 2 2012, 4:17 am
From: Dominique Pellé <dominique.pe...@gmail.com>
Date: Tue, 2 Oct 2012 10:17:20 +0200
Local: Tues, Oct 2 2012 4:17 am
Subject: Re: change display colors. which rule causes which color?

Gelonida N wrote:
> On 10/02/2012 01:00 AM, richard emberson wrote:

>> To see the "group" I use:

>> map <F10> :echo "hi<"
>> synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>

>> To see the colors associated with a group use:

>> :highlight "groupname"

> Thanks a lot for this tip.
> This helps me to identify the groups, that are tricky to visualize.

You can also show in the statusline the syntax group where cursor is located.
See:

http://vim.wikia.com/wiki/Showing_syntax_highlight_group_in_statusline

-- Dominique


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
geoffrey.w...@thomsonreuters.com  
View profile  
 More options Oct 2 2012, 6:04 am
From: geoffrey.w...@thomsonreuters.com
Date: Tue, 2 Oct 2012 03:04:05 -0700 (PDT)
Local: Tues, Oct 2 2012 6:04 am
Subject: Re: change display colors. which rule causes which color?

On Monday, 1 October 2012 23:33:17 UTC+1, Gelonida N  wrote:
> The problem is, that all dark blue colors are very difficult to recognize.
> Ideally I'd like to change all dark blue vim colors into a lighter blue
> or another color.

I have the same problem with dark blue.

> Is there an easy way to globally change one color with another[?]

(Using Windows - not sure if this applies under other OSs.)
Most colours are ultimately defined in vim\vim73\rgb.txt (if
you're using VIM 7.3 of course).

You can simply define your own colour in there and then use
it in your colourscheme or whereever.  I add this line

0   96  255 BobBlue

and then use it in my colourscheme:

exe 'hi SpecialKey guifg=BobBlue'
exe 'hi NonText guifg=BobBlue gui=NONE'
if !exists("$TERM")
    hi SpecialKey ctermbg=DarkBlue ctermfg=White
    hi NonText ctermbg=DarkBlue ctermfg=White
endif

You can define it directly in the colourscheme and avoid the
"exe" complication but then you can't use it in all other places,
as far as I could tell.

Since it doesn't work in DOS terminals I use DarkBlue
background with White text there instead.

You might be able to just edit the DarkBlue colour instead.
You'd have to try that to see.  Some core colours
are defined elsewhere though - for example replace all the
colours in rgb.txt with 77 77 77 and gvim still shows the
colours like "red" as usual, although "red" is one of the
lines in the file.

Another problem is that rgb.txt is kept alongside the
executable and so upgrades to the vim version will lose your
changes.  You'd expect there to be a way to define your own
colours under $VIMRUNTIME, e.g., include your own rgb.txt
there and have it added to the main colours, but I couldn't
find such a method.

Therefore I have the code below at the start of my _vimrc,
and I keep my BobBlue colour and other colours in the file
$VIMRUNTIME\rgb.txt

It doesn't feel very elegant and there's possibly a better
way to do it - works for me though.

regards,
Geoff

" Update rgb.txt with my custom colours - if they don't
" exist

" read in my colours and default colours from the file
let s:my_colours = readfile($VIM . "\\vimfiles\\rgb.txt")
let s:rgb_file = readfile($VIMRUNTIME . "\\rgb.txt")

let s:added_colours = 0
" for each of my colours
for s:my_colour in s:my_colours
    let s:found=0
    " for each of the default colours...
    for s:line in s:rgb_file
        "...found my colour?
        if s:line =~ s:my_colour
            let s:found=1
            break
        endif
    endfor
    "if didn't find my colour...
    if s:found==0
        " ... add it to the default colours
        let s:rgb_file += [s:my_colour]
        let s:added_colours += 1
    endif
endfor
" if we changed the default colours, update the file
if s:added_colours > 0
    call writefile(s:rgb_file, $VIMRUNTIME . "\\rgb.txt")
endif


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Charles Campbell  
View profile  
 More options Oct 3 2012, 11:39 am
From: Charles Campbell <Charles.E.Campb...@nasa.gov>
Date: Wed, 03 Oct 2012 11:39:09 -0400
Local: Wed, Oct 3 2012 11:39 am
Subject: Re: change display colors. which rule causes which color?

Check out hicolors --

     http://www.drchip.org/astronaut/vim/index.html#HICOLORS   (cutting
edge)
     http://vim.sourceforge.net/scripts/script.php?script_id=1081  (stable)

It gives help for highlighting colors by showing the name of the
highlight in
its currently selected color.  Left-clicking on that color name will
bring you
to the help for it, and right-clicking on it will bring up a color editor.

Also, I suggest looking into using hilinks.vim:

    http://www.drchip.org/astronaut/vim/index.html#HILINKS

This plugin provides a syntax stack trace and a highlighting stack trace
as you move your cursor about.  In other words, as you move your cursor
about, hilinks will identify which syntax highlighting group is
responsible for what you see.

Regards,
C Campbell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »