Results 1 to 5 of 5

Thread: Make my own Geany color scheme?

  1. #1
    Join Date
    Apr 2012
    Location
    Somewhere in Nevada...
    Beans
    141
    Distro
    Ubuntu 12.04 Precise Pangolin

    Make my own Geany color scheme?

    Despite the fact that I'm only learning how to program, I still have already developed preferences towards syntax highlighting. Does anyone know how I can make my own color scheme for Geany?

  2. #2
    Join Date
    May 2007
    Location
    Leeds, UK
    Beans
    1,664
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Make my own Geany color scheme?

    Go to Tools -> Configuration Files -> filetypes.common and play with the colours. You can also edit the files in ~/.config/geany/filedefs, copying from /usr/share/geany where necessary.

    More info: http://www.geany.org/manual/current/...letypes-common

    As the name suggests, filetypes.common is common styles across languages. The other filetypes.* files are for specific languages.
    Last edited by r-senior; April 20th, 2012 at 11:41 PM.

  3. #3
    Join Date
    Apr 2012
    Location
    Somewhere in Nevada...
    Beans
    141
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Make my own Geany color scheme?

    Thank You soo much!

  4. #4
    Join Date
    Apr 2012
    Location
    Somewhere in Nevada...
    Beans
    141
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Make my own Geany color scheme?

    Quote Originally Posted by r-senior View Post
    As the name suggests, filetypes.common is common styles across languages. The other filetypes.* files are for specific languages.
    so, how would I make a specific file for, say, python?

  5. #5
    Join Date
    May 2007
    Location
    Leeds, UK
    Beans
    1,664
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Make my own Geany color scheme?

    You'd edit the files in ~/.config/geany/filedefs, copying from /usr/share/geany where necessary.

    For example, I like """ and ''' to be styled as strings, even though they are used a lot for documentation comments. So I copied /usr/share/geany/filetypes.python to ~/.config/geany/filedefs/filetypes.python and changed:

    Code:
    triple=string
    tripledouble=commentdoc
    
    to 
    
    triple=string
    tripledouble=string
    So both triple-quotes are now styled as strings. Then I change the style with filetypes.common:

    Code:
    string=0x995c00
    So the standard approach is to use the definitions in filetypes.common to create named styles and associate colours and text attributes with those. Then refer to those named styles in the filetypes.python file to style specific aspects of Python code. I've used existing named styles but you can create additional ones -- with the risk of creating a confusing colour scheme if you create too many.

    You can also break from this standard approach and style directly in the filetypes.python file.

    Beyond that, you'll have to read the documentation and experiment.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •