Search code examples
ace-editor

Themes in Editors


I have heard word "theme" and "mode" in related to editors like ace editor. For example:

theme

https://github.com/ajaxorg/ace-builds/blob/master/src-noconflict/theme-tomorrow.js

mode:

https://github.com/ajaxorg/ace-builds/blob/master/src-noconflict/mode-javascript.js

What those files used for, What functionality does it add to the editor? difference between those two, please explain. I'm a newbie to this area.


Solution

  • In ace mode is the syntax highlighter for the language, it splits text into words and assigns them classes based on syntax e.g /**/ gets comment and "" gets string class. Theme assigns colors to those classes, and to the other parts of the editor, like background and font color.