Sunday, 29 December 2019

Create Custom Syntax Colouring in Amazon Cloud9

Amazon AWS Cloud9 IDE by now (2019) is having no feature to create custom syntax colouring, only choose from available ones. But there's a work-around here:
  1. Make theme CSS
    Go to some temporary dir:
    git clone https://github.com/ajaxorg/ace
    cd ace/tool
    npm i
    node tmtheme.js THEME-NAME \
    /path/to/some-theme.tmtheme /path/to/output/dir
  2. Edit the theme CSS
    Go to /path/to/output/dir
    Open THEME-NAME.css
    Replace the prefix CSS class ".ace-XXX" to ".ace_content"
    Ctrl-A (Select all CSS), Ctrl-C (Copy)
  3. Apply the theme CSS
    Open Cloud9 IDE, go to Preferences >> Themes >> Edit your stylesheet
    Ctrl-V (Paste the CSS), Ctrl-S (Save)
  4. See it applied!
    Open any file, to enjoy the custome theme.
Reference:
https://community.c9.io/t/how-do-i-upload-a-custom-theme-to-my-workspace/20893/3

No comments:

Post a Comment