Altium NEXUS Documentation

EditSyntax

Modified by Jason Howie on Jun 2, 2017

Parent page: TextEdit Commands

The following pre-packaged resource, derived from this base command, is available:


Applied Parameters: None

Summary

This command is used to access the Syntax Editor dialog, from where the syntax scheme for the language associated to the current document can be defined/edited. Syntax highlighting is a method used to make text documents more readable, where different elements in the document are highlighted based on their syntax. The way this is done is to assign different words, symbols and identifiers a unique color. This set of color assignments is called that language's syntax.

Access

This command is accessed from the Text Editor (or any coding-aware variant of the Text Editor), by clicking the  button on the Text Utilities toolbar.

While the command is generically available from the Text Utilities toolbar, note that no language is associated to standard text files (*.txt) and so access to the dialog is not permitted from within a document of this type.

Use

After launching the command, the Syntax Editor dialog will appear. The dialog is divided into five tabs, each representing a different area of the language's syntax:

  • Options - used to define various general syntax options.
  • Comments - used to define comments. Comments are elements in the text file that you wish to define as code comments. These can be defined as single-line, full-line or multi-line comments. Comments are defined by their delimiters, that is, the characters that indicate that a block of text is a comment. Single line and full-line comments only require a left delimiter (the other end is defined by an EOL character). Single line comments can commence anywhere on a line, full line comments require the comment delimiter to be the first character on the line. Multi-line comments require a left delimiter and a right delimiter to define where they start and end.
  • Strings - used to define strings. Strings are elements in the text file that you wish to define as strings in the code, such as strings that appear as a message in a dialog that your program displays. Both single-line and multi-line strings are supported and both types require the left and right delimiters to define their start and end point.
  • Numbers - used to define numbers. Like comments and strings, numbers are another class of information in the document that you may wish to make stand out. Simple numbers are defined as being strings of numeric digits, which may or may not contain a decimal point, for example 45, 45.6 but not 45.6.6. Simple numbers can also include an E character, denoting scientific notation, such as 53E3, or 24e6. Special numbers are defined as having a prefix and/or a suffix and contain numerical digits, or the letters A-F. These could be used to tell a compiler that the number is hexadecimal or octal, for example. Examples of these numbers are 0xAF034AD, 88j, j8A8y, but not 0xA.4. Each number type is specified by a suffix, a prefix or a prefix and suffix combination. The basic behavior of prefixes and suffixes is that whenever a valid prefix or suffix is detected in combination with a number, then the number and the prefix (or suffix) is highlighted, according to the number style. This basic behavior can be modified through additional available options.
  • Keywords - used to define keywords. Keywords are a set of pre-defined words that you would like to stand out in your document. Typically these are words reserved by the programming language to identify a specific function, procedure, object type, and so on. Keywords are defined as part of one or more keyword sets, each with its own style (color and font parameters), further enhancing the readability of your document.

Tips

  1. Enable/disable syntax highlighting for each of the syntax elements in their respective tabs. If the highlight option for a syntax element is disabled, then any such syntax that exists in the document will become unhighlighted and will revert back to the style for normal text.
  2. If the same keyword appears in more than one keyword set, then the highlighting style of the set that appears first in the list will be applied.
  3. Keywords can contain alpha and numeric characters and also the underscore character. The keyword cannot begin with a numeric character.

 

Found an issue with this document? Highlight the area, then use Ctrl+Enter to report it.

Contact Us

Contact our corporate or local offices directly.

We're sorry to hear the article wasn't helpful to you.
Could you take a moment to tell us why?
You are reporting an issue with the following selected text
and/or image within the active document:
ALTIUM DESIGNER FREE TRIAL
Altium Designer Free Trial
Let’s get started. First off, are you or your organization already using Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

In that case, why do you need an evaluation license?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You actually don’t need an evaluation license for that.

Click the button below to download the latest Altium Designer installer.

Download Altium Designer Installer

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Please fill out the form below to get a quote for a new seat of Altium Designer.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

If you are on Altium Subscription, you don’t need an evaluation license.

If you are not an active Altium Subscription member, please fill out the form below to get your free trial.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Why are you looking to evaluate Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

You came to the right place! Please fill out the form below to get your free trial started.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Great News!

Valid students can get their very own 6-month Altium Designer Student License for FREE! Just fill out the form below to request your Student License today.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

That’s great! Making things is awesome. We have the perfect program for you.

Upverter is a free community-driven platform designed specifically to meet the needs of makers like you.

Click here to give it a try!

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.