Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| syntax:start [2016/03/06 16:25] – [How to Modify an existing syntax schema] admin | syntax:start [2018/03/23 12:46] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Syntax schema definition ====== | ====== Syntax schema definition ====== | ||
| - | Here you can find basic description of HippoEDIT [[terms: | + | Here you can find a basic description of HippoEDIT [[terms: |
| ===== How long it takes to create new syntax schema ===== | ===== How long it takes to create new syntax schema ===== | ||
| The time you need to create a new syntax schema depends on the programming language syntax complexity and on the language syntax " | The time you need to create a new syntax schema depends on the programming language syntax complexity and on the language syntax " | ||
| - | Normally if the language has C like syntax, you will need less than 1 hour to create the basic skeleton of the new syntax schema. For more complex languages it could take up to 3 hours. Of course the time also depends on how familiar you are with HippoEDIT syntax definition rules. Looking at a similar existing syntax as an example can help. | + | Normally if the language has C-like syntax, you will need less than 1 hour to create the basic skeleton of the new syntax schema. For more complex languages it could take up to 3 hours. Of course, the time also depends on how familiar you are with HippoEDIT syntax definition rules. Looking at a similar existing syntax as an example can help. |
| - | If you have an existing syntax schema for UltraEDIT, TextPad or PSPad you can greatly speed up creation by converting the existing schema into HippoEDIT syntax definition schema using [[plugins: | + | If you have an existing syntax schema for UltraEdit, TextPad or PSPad you can greatly speed up creation by converting the existing schema into HippoEDIT syntax definition schema using [[plugins: |
| More advanced syntax configuration as: labels (to get [[view: | More advanced syntax configuration as: labels (to get [[view: | ||
| Line 22: | Line 22: | ||
| ==== Syntax attributes ==== | ==== Syntax attributes ==== | ||
| - | * **id** (any string, | + | * **id** (any string, |
| * **name** (any string) – description of the language that would be used in UI | * **name** (any string) – description of the language that would be used in UI | ||
| - | * **inherit** (any id) – name of base (parent) schema. | + | * **inherit** (any id) – name of base (parent) schema. |
| - | * **inhertit_url** (file path, relative or absolute) – name of parent schema file. Used only for navigation between schemas when opened in browser (optional). | + | * **inhertit_url** (file path, relative or absolute) – name of parent schema file. Used only for navigation between schemas when opened in the browser (optional). |
| + | * **abstract** (boolean, true/false, the default is false) - if set to true, the syntax will not be used for direct document syntax, but only as a base for some other syntax | ||
| + | * **version** (string, in form of N.N) - version of the syntax schema | ||
| + | * **required** (string, in form of N.N) - minimum version of the HippoEDIT to ensure proper syntax highlighting | ||
| + | * **preferred** (string, in form of N.N) - minimum optimum version of the HippoEDIT to ensure the best level of syntax highlighting | ||
| + | * **author** (any string) - author of the schema. If not set, //author// from // | ||
| + | * **email** (any string) - email of the author | ||
| After creating the definition files and copying them into {Data} folder, HippoEDIT should load definitions and display them in Available Languages list (// | After creating the definition files and copying them into {Data} folder, HippoEDIT should load definitions and display them in Available Languages list (// | ||
| Line 38: | Line 44: | ||
| ===== General rules ===== | ===== General rules ===== | ||
| - | * There is no specific order of XML tags necessary. But for keywords it's better to keep alphabetic order - this way internal loading is faster. | + | * There is no specific order of XML tags necessary. But for keywords, it's better to keep alphabetic order - this way internal loading is faster. |
| * All tags and attribute name are CASE SENSITIVE. | * All tags and attribute name are CASE SENSITIVE. | ||
| - | * All non English text should be correctly encoded in UTF-8 | + | * Whole not English text should be correctly encoded in UTF-8 |
| * You can use comments, comment some parts etc. | * You can use comments, comment some parts etc. | ||
| ===== How to Modify an existing syntax schema ===== | ===== How to Modify an existing syntax schema ===== | ||
| - | Direct modifications of default syntax schemes | + | Direct modifications of default syntax schemes |
| - | <note tip> | + | <note tip> |
| - | The recommended way for modification, is creating new syntax schema, inheriting from original one, and adding | + | The recommended way for modification is creating new syntax schema, inheriting from the original one, and adding new styles or overwriting inherited ones, for example. To not have conflicts with the detecting of proper syntax on document open (you have two syntax schema definitions reacting on same file mask, due to inheriting) you can disable original syntax in [[options: |
| Example of syntax schema for HTML, adding new style: | Example of syntax schema for HTML, adding new style: | ||
| Line 74: | Line 80: | ||
| * [[syntax: | * [[syntax: | ||
| - | <note tip>The easiest way to start with creating a new syntax | + | <note tip>The easiest way to start with creating a new syntax |