[Geany] colour of selected area

spir denis.spir at xxxxx
Tue Feb 21 10:15:43 UTC 2012


On 02/21/2012 09:08 AM, Patrick wrote:
> I downloaded this colour scheme:
> http://www.barryvan.com.au/2009/01/geany-ide-tango-dark-colour-scheme/
>
> I like it but when a line is selected it highlights white text with a
> white background.
>
> Could someone tell me where I can change the colour of the selected line?
>
> Thanks-Patrick

If you have not yet tweaked Geany's config files (which is probable as 
you ask this), here are a few points:

* Geany's "filetype" (read: language) config files originally are in a 
system-wide folder: /usr/share/geany under linux

* To customize one of them, you must (or rather should) first copy it 
into your personal config folder for filetypes: ~/.config/geany/filedefs

* Fortunately, there is a shortcut for filetypes.common: you can 
directly open it in and from geany via menu: tools --> config files. I 
guess the personal copy is created if it does not exist yet (check).
(I asked for the same feature for specific languages; it may come one day.)

* There in filetypes.common you'll find default values for all kinds of 
params about visual appearance, especially colors, which are active 
unless overriden by language-specific values.

* The first section defines rendering of special cases (eg selection) or 
surrouding features (folding symbols in margin). Some of them may not be 
obvious: try with weird colors, open any true text for edit, reload the 
config (in menu tools again).

* Geany has a handy tool, namely a builtin color chooser (*); place it 
on your tool bar if not yet there. Morever, if you select a color before 
opening it, the chooser has it selcted so you start with it, and when 
after changing you valid the color it replaces the original one in 
config text.

* The last section of filetypes.common defines text highlighting 
properly speaking, using named colors that you can use in specific 
filetype config files, including there in common. For instance, I have this:

# datum: brown
datum=0x703D00;0xFCDFB8;false;false
number=datum
string=datum

Hope this helps (others too).

Denis

(1) Unfortunately, it is a HSV color selector. I have never been able to 
understand the logic of HSV (even after reading about this color model, 
compared to others); only H for hue is OK. S is /not/ saturation, and V 
even less lightness. Thus, I always end up tweaking S & V components 
more or less by chance. Hints welcome.
HSL is obvious: S is truely saturation (purity, "vividity") and L truely 
lightness (black to white).
I imagine Geany uses a GTK component, so I won't ask for a change... 
except if ever GTK has a human-usable color selector (read HSL).



More information about the Users mailing list