How do i upload a custom theme to my workspace?


#1

Hello,

So I made a custom theme using https://tmtheme-editor.herokuapp.com/. Now I can’t figure out how to import it to my workspace(using the online IDE). Help please.

Thank you


Theme, from Eclipse to C9
Installing Custom Theme and Syntax
Will we ever get a dark modern theme?
#2

Can’t figure this out either. The docs are confusing and incomplete. Seems like you have to make a whole plugin package though.


#3

So I found a quick hack for this:

git clone https://github.com/ajaxorg/ace
cd ace
# Insert your downloaded tmTheme file from https://tmtheme-editor.herokuapp.com here
cd tool
npm i
cd ..
node ./tool/tmtheme.js [yourThemeName] [yourThemeName].tmTheme ./

Now in the ace folder you will see a new file created [yourThemeName].css
Go to your C9 workspace, select any of the existing themes, for instance Idle Fingers
Click on Cloud9 -> Open Your Stylesheet

Now compare this stylesheet with the one you created in the /ace folder. You will see that they are the same except for the theme name classes, for instance my theme is called One Dark and my C9 default theme is Idle Fingers. The custom theme css classes start with .ace–one-dark and the Idle Fingers theme’s classes start with .ace-idle-fingers.

All you have to do now is to replace all instances of .ace–one-dark with .ace-idle-fingers in your custom created css file. It’s easy to do in any code editor, CTRL+F and search for .ace–one-dark, insert .ace-idle-fingers into replace field and click on Replace All.

That’s it, now just copy the contents of the custom stylesheet into the C9 Idle Fingers stylesheet, you’re done.

When running tmTheme.js, if you get something like this:

can't parse color ABB2BF
/home/ubuntu/workspace/ace/tool/tmtheme.js:203
        var rgba = color.match(/^#(..)(..)(..)(..)$/).slice(1).map(function(c) 

It means that your dowloaded .tmTheme file is broken somewhere, in this case there was no # sign inserted before the hex color value, so just find the broken value inside the file and change it, then try to convert again.

Cheers :]


#6

Thanks for the tip, that seemed to work. Hopefully c9 makes it a bit more accessible in the future.