diff options
-rw-r--r-- | doc/14_Appendix.md | 16 | ||||
-rw-r--r-- | themes/dark.lua | 48 | ||||
-rw-r--r-- | themes/light.lua | 48 | ||||
-rw-r--r-- | themes/term.lua | 46 |
4 files changed, 79 insertions, 79 deletions
diff --git a/doc/14_Appendix.md b/doc/14_Appendix.md index 5bf49217..7be3e490 100644 --- a/doc/14_Appendix.md +++ b/doc/14_Appendix.md @@ -9,7 +9,7 @@ _Character Class:_ A character class is used to represent a set of characters. The following combinations are allowed in describing a character class: -* **_`x`_:** (where _x_ is not one of the magic characters `^$()%.[]*+-?`) +* **_`x`_:** (where _x_ is not one of the magic characters `^%()%.[]*+-?`) represents the character _x_ itself. * **`.`:** (a dot) represents all characters. * **`%a`:** represents all letters. @@ -211,20 +211,20 @@ to Textadept 7: | l.style_nothing = style{} | prop['style.nothing'] = '' l.style_class = style{ | prop['style.class'] = - fore = l.colors.yellow | 'fore:$(color.yellow)' + fore = l.colors.yellow | 'fore:%(color.yellow)' } | ... ... | prop['style.identifier'] = - l.style_identifier = l.style_nothing | '$(style.nothing)' + l.style_identifier = l.style_nothing | '%(style.nothing)' | ... | ... | | prop['font'] = 'Monospace' local font, size = 'Monospace', 10 | prop['fontsize'] = 10 l.style_default = style{ | prop['style.default'] = - font = font, size = size, | 'font:$(font),'.. - fore = l.colors.light_black | 'size:$(fontsize),'.. - back = l.colors.white | 'fore:$(color.light_black),'.. - } | 'back:$(color.white)' + font = font, size = size, | 'font:%(font),'.. + fore = l.colors.light_black | 'size:%(fontsize),'.. + back = l.colors.white | 'fore:%(color.light_black),'.. + } | 'back:%(color.white)' ... | ... -- File *theme/view.lua* | -- Same file *theme.lua*! @@ -249,7 +249,7 @@ Notes: that Textadept's API documentation uses consistently. 3. The only property names that matter are the "style._name_" ones. Other property names are arbitrary. -4. Instead of using variables, which are evaluated immediately, use "$(key)" +4. Instead of using variables, which are evaluated immediately, use "%(key)" notation, which substitutes the value of property "key" at a later point in time. This means you do not have to define properties before use. You can also modify existing properties without redefining the properties that depend diff --git a/themes/dark.lua b/themes/dark.lua index ca9a2275..b8ed32d5 100644 --- a/themes/dark.lua +++ b/themes/dark.lua @@ -61,33 +61,33 @@ end -- Token styles. property['style.nothing'] = '' -property['style.class'] = 'fore:$(color.light_yellow)' -property['style.comment'] = 'fore:$(color.dark_grey)' -property['style.constant'] = 'fore:$(color.red)' -property['style.error'] = 'fore:$(color.red),italics' -property['style.function'] = 'fore:$(color.blue)' -property['style.keyword'] = 'fore:$(color.dark_white)' -property['style.label'] = 'fore:$(color.orange)' -property['style.number'] = 'fore:$(color.teal)' -property['style.operator'] = 'fore:$(color.yellow)' -property['style.regex'] = 'fore:$(color.light_green)' -property['style.string'] = 'fore:$(color.green)' -property['style.preprocessor'] = 'fore:$(color.purple)' -property['style.type'] = 'fore:$(color.lavender)' -property['style.variable'] = 'fore:$(color.light_blue)' +property['style.class'] = 'fore:%(color.light_yellow)' +property['style.comment'] = 'fore:%(color.dark_grey)' +property['style.constant'] = 'fore:%(color.red)' +property['style.error'] = 'fore:%(color.red),italics' +property['style.function'] = 'fore:%(color.blue)' +property['style.keyword'] = 'fore:%(color.dark_white)' +property['style.label'] = 'fore:%(color.orange)' +property['style.number'] = 'fore:%(color.teal)' +property['style.operator'] = 'fore:%(color.yellow)' +property['style.regex'] = 'fore:%(color.light_green)' +property['style.string'] = 'fore:%(color.green)' +property['style.preprocessor'] = 'fore:%(color.purple)' +property['style.type'] = 'fore:%(color.lavender)' +property['style.variable'] = 'fore:%(color.light_blue)' property['style.whitespace'] = '' -property['style.embedded'] = '$(style.tag),back:$(color.light_black)' -property['style.identifier'] = '$(style.nothing)' +property['style.embedded'] = '%(style.tag),back:%(color.light_black)' +property['style.identifier'] = '%(style.nothing)' -- Predefined styles. -property['style.default'] = 'font:$(font),size:$(fontsize),'.. - 'fore:$(color.light_grey),back:$(color.black)' -property['style.linenumber'] = 'fore:$(color.dark_grey),back:$(color.black)' -property['style.bracelight'] = 'fore:$(color.light_blue)' -property['style.bracebad'] = 'fore:$(color.light_red)' -property['style.controlchar'] = '$(style.nothing)' -property['style.indentguide'] = 'fore:$(color.light_black)' -property['style.calltip'] = 'fore:$(color.light_grey),back:$(color.light_black)' +property['style.default'] = 'font:%(font),size:%(fontsize),'.. + 'fore:%(color.light_grey),back:%(color.black)' +property['style.linenumber'] = 'fore:%(color.dark_grey),back:%(color.black)' +property['style.bracelight'] = 'fore:%(color.light_blue)' +property['style.bracebad'] = 'fore:%(color.light_red)' +property['style.controlchar'] = '%(style.nothing)' +property['style.indentguide'] = 'fore:%(color.light_black)' +property['style.calltip'] = 'fore:%(color.light_grey),back:%(color.light_black)' -- Multiple Selection and Virtual Space --buffer.additional_sel_alpha = diff --git a/themes/light.lua b/themes/light.lua index ec4497d6..3e06e22d 100644 --- a/themes/light.lua +++ b/themes/light.lua @@ -61,33 +61,33 @@ end -- Token styles. property['style.nothing'] = '' -property['style.class'] = 'fore:$(color.yellow)' -property['style.comment'] = 'fore:$(color.grey)' -property['style.constant'] = 'fore:$(color.red)' -property['style.error'] = 'fore:$(color.red),italics' -property['style.function'] = 'fore:$(color.dark_orange)' -property['style.keyword'] = 'fore:$(color.dark_blue)' -property['style.label'] = 'fore:$(color.dark_orange)' -property['style.number'] = 'fore:$(color.teal)' -property['style.operator'] = 'fore:$(color.purple)' -property['style.regex'] = 'fore:$(color.dark_green)' -property['style.string'] = 'fore:$(color.green)' -property['style.preprocessor'] = 'fore:$(color.dark_yellow)' -property['style.type'] = 'fore:$(color.lavender)' -property['style.variable'] = 'fore:$(color.dark_lavender)' +property['style.class'] = 'fore:%(color.yellow)' +property['style.comment'] = 'fore:%(color.grey)' +property['style.constant'] = 'fore:%(color.red)' +property['style.error'] = 'fore:%(color.red),italics' +property['style.function'] = 'fore:%(color.dark_orange)' +property['style.keyword'] = 'fore:%(color.dark_blue)' +property['style.label'] = 'fore:%(color.dark_orange)' +property['style.number'] = 'fore:%(color.teal)' +property['style.operator'] = 'fore:%(color.purple)' +property['style.regex'] = 'fore:%(color.dark_green)' +property['style.string'] = 'fore:%(color.green)' +property['style.preprocessor'] = 'fore:%(color.dark_yellow)' +property['style.type'] = 'fore:%(color.lavender)' +property['style.variable'] = 'fore:%(color.dark_lavender)' property['style.whitespace'] = '' -property['style.embedded'] = '$(style.tag),back:$(color.dark_white)' -property['style.identifier'] = '$(style.nothing)' +property['style.embedded'] = '%(style.tag),back:%(color.dark_white)' +property['style.identifier'] = '%(style.nothing)' -- Predefined styles. -property['style.default'] = 'font:$(font),size:$(fontsize),'.. - 'fore:$(color.light_black),back:$(color.white)' -property['style.linenumber'] = 'fore:$(color.grey),back:$(color.white)' -property['style.bracelight'] = 'fore:$(color.light_blue)' -property['style.bracebad'] = 'fore:$(color.light_red)' -property['style.controlchar'] = '$(style.nothing)' -property['style.indentguide'] = 'fore:$(color.dark_white)' -property['style.calltip'] = 'fore:$(color.light_black),back:$(color.dark_white)' +property['style.default'] = 'font:%(font),size:%(fontsize),'.. + 'fore:%(color.light_black),back:%(color.white)' +property['style.linenumber'] = 'fore:%(color.grey),back:%(color.white)' +property['style.bracelight'] = 'fore:%(color.light_blue)' +property['style.bracebad'] = 'fore:%(color.light_red)' +property['style.controlchar'] = '%(style.nothing)' +property['style.indentguide'] = 'fore:%(color.dark_white)' +property['style.calltip'] = 'fore:%(color.light_black),back:%(color.dark_white)' -- Multiple Selection and Virtual Space --buffer.additional_sel_alpha = diff --git a/themes/term.lua b/themes/term.lua index 43c6cbdc..fde41f16 100644 --- a/themes/term.lua +++ b/themes/term.lua @@ -29,32 +29,32 @@ property['color.light_white'] = 0xFFFFFF -- Token styles. property['style.nothing'] = '' -property['style.class'] = 'fore:$(color.yellow)' -property['style.comment'] = 'fore:$(color.black),bold' -property['style.constant'] = 'fore:$(color.red)' -property['style.error'] = 'fore:$(color.red),bold' -property['style.function'] = 'fore:$(color.blue)' -property['style.keyword'] = 'fore:$(color.white),bold' -property['style.label'] = 'fore:$(color.red),bold' -property['style.number'] = 'fore:$(color.cyan)' -property['style.operator'] = 'fore:$(color.yellow)' -property['style.regex'] = 'fore:$(color.green),bold' -property['style.string'] = 'fore:$(color.green)' -property['style.preprocessor'] = 'fore:$(color.magenta)' -property['style.type'] = 'fore:$(color.magenta),bold' -property['style.variable'] = 'fore:$(color.blue),bold' +property['style.class'] = 'fore:%(color.yellow)' +property['style.comment'] = 'fore:%(color.black),bold' +property['style.constant'] = 'fore:%(color.red)' +property['style.error'] = 'fore:%(color.red),bold' +property['style.function'] = 'fore:%(color.blue)' +property['style.keyword'] = 'fore:%(color.white),bold' +property['style.label'] = 'fore:%(color.red),bold' +property['style.number'] = 'fore:%(color.cyan)' +property['style.operator'] = 'fore:%(color.yellow)' +property['style.regex'] = 'fore:%(color.green),bold' +property['style.string'] = 'fore:%(color.green)' +property['style.preprocessor'] = 'fore:%(color.magenta)' +property['style.type'] = 'fore:%(color.magenta),bold' +property['style.variable'] = 'fore:%(color.blue),bold' property['style.whitespace'] = '' -property['style.embedded'] = '$(style.tag),back:$(color.black),bold' -property['style.identifier'] = '$(style.nothing)' +property['style.embedded'] = '%(style.tag),back:%(color.black),bold' +property['style.identifier'] = '%(style.nothing)' -- Predefined styles. -property['style.default'] = 'fore:$(color.white),back:$(color.black)' -property['style.linenumber'] = '$(style.default)' -property['style.bracelight'] = 'fore:$(color.black),back:$(color.white)' -property['style.bracebad'] = 'fore:$(color.red),bold' -property['style.controlchar'] = '$(style.nothing)' -property['style.indentguide'] = '$(style.nothing)' -property['style.calltip'] = '$(style.default)' +property['style.default'] = 'fore:%(color.white),back:%(color.black)' +property['style.linenumber'] = '%(style.default)' +property['style.bracelight'] = 'fore:%(color.black),back:%(color.white)' +property['style.bracebad'] = 'fore:%(color.red),bold' +property['style.controlchar'] = '%(style.nothing)' +property['style.indentguide'] = '%(style.nothing)' +property['style.calltip'] = '%(style.default)' -- Multiple Selection and Virtual Space --buffer.additional_sel_alpha = |