CherryTree custom codeblock background

A ramble of why…..

…..i want to change the background colour of CherryTree’s codeblocks.

I use Linux as my OS of choice and have for many years. One thing that has been missing is a really good all round note application. I have always wanted something like Onenote but for the past few years I have discovered how powerful markdown is. The use of the ‘`’ (back tick) to insert command line or code in the middle of a document is extremely useful, I find it so much easier to read because it breaks down the text into a consumable form.

These days there are a lot of Electron markdown note taking apps popping up, this isn’t necessarily a bad thing but I find electron apps don’t look very good at all in Linux. I use typora at work on my Mac and it looks native. The same application just looks pretty bad under Ubuntu. Yes it does look worse because it is a Snap but even under fedora it isn’t great.

Typora application doesn't look nice in Ubuntu

Anyway…..

CherryTree is not a markdown editor but it is a very loved and feature rich note application (Which is currently bucking the trend of Electron and getting ported to GTK3 C++). CherryTree doesn’t have the same markdown style backticks but it does have codeblock; either plain text or a programming code block which can be executed. However the default styles don’t gently highlight the background of the block.

CherryTree Configuration

Theme File Location: 

Go to Scribes Theme Generator to create a new theme and save the XML or make a copy of an existing theme style.

Then copy it to the theme location above (Correct as of Ubuntu 19.04).

Now you should see the new theme in the Style Scheme list.

After restarting CherryTree you should see it take effect.

Please Note: It will change the theme of the code pages too NOT just code blocks.

A new theme for the codeblocks in CherryTree

 

Files:

There two versions of the file. One has line highlighting while the other does not.

My XML Files

Please share 🙂