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.

Veröffentlicht unter Allgemein, Embedded | 5 Kommentare