Using a dark background with CoIDE

At work I had to develop some firmware for two different ARM micro controllers (LPC and STM32). Although I don’t like IDEs in general, after some search I’ve chosen CoIDE for that task.

It works well with Segger JLink, supports a broad list of micro controllers (including the ones our hardware had)  and it’s free (in terms of beer, not speech). Well, it only works on Microsoft Windows, but as long as I only have to work under Windows and not for Windows, that’s okay for a while.

The only thing I missed was the ability to choose a dark colour theme. Yes, I don’t like white background when coding. I hate it! CoIDE is based on Eclipse and on eclipsecolorthemes there are plenty of themes available for that IDE, including – of course – dark ones.

Unfortunately the developers of CoIDE removed the ability import options, which makes it also impossible to import that theme. But when using an text editor, the theme can be imported manually by editing a few settings file. That’s what I describe here.

So let’s download a theme and open the EPF file. It looks like

/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.SelectionForeground.SystemDefault=false
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.SelectionBackground.SystemDefault=false
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.Background.SystemDefault=false
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.Foreground.SystemDefault=false

Most settings are for different Eclipse plugin (in Eclipse, every function is a plugin, even the core text editor). My theme has settings for C/C++ (CDT), Java (JDT), PHP, Ruby, Python and so on. In case of CoIDE, we care about following:

  • /instance/org.eclipse.ui.editors
  • /instance/org.eclipse.cdt.ui

That’s it. All lines that don’t start with one of the two prefixes can be removed.

Now make sure that CoIDE is not running and open the file C:\CooCox\CoIDE\configuration\ProgramData\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.cdt.ui.prefs in the text editor of your choice. That can be ViM or Notepad++. Append each line that starts with /instance/org.eclipse.cdt.ui but remove the prefix. Example:

asm_directive=147,199,99
asm_label=224,226,228
c_braces=232,226,183
c_comment_task_tag=255,139,255

The same for org.eclipse.ui.editors.prefs in the same directory: Add everything that starts with /instance/org.eclipse.ui.editors and remove the prefix. Either use rectangular selection or search and replace.

Now start CoIDE and enjoy the result:

coide_screenshot

That’s Obsidian, BTW.

Dieser Beitrag wurde unter Allgemein, Embedded veröffentlicht. Setze ein Lesezeichen auf den Permalink.

3 Kommentare zu Using a dark background with CoIDE

  1. Martin Valik sagt:

    Hello,

    I tried to change my theme (Sublime text 2) in CooCox and it works, except one thing.
    When I click on text, it highlights (of course) and makes it impossible to see the text underneath. Could you please advise me how to change the „highlighting“ color, or how to fix this problem ?

    Thank you in advance

  2. Máté Katona sagt:

    They moved these files in CoIDE V2 beta from C:\CooCox\… to C:\Users\[username]\AppData\Roaming\CooCox\…

    but the method still works, thanks!!

  3. Matic sagt:

    I’t’s been awhile since this post, but anyway… I have one legacy project that I don’t want to migrate from Coocox and light theme is really killing.
    With Coocox 2.0.3 I tried several themes and everything changes except for the background. So I end up with dark schemed text on a white background. Any ideas where to look for?

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.