I suggest the syntax highlighting wordfile without color and font style settings attached initially to this post
(and removed later). It is compatible with UltraEdit for Windows v15.20.
The colon is defined as word delimiter. This is necessary because of the space character after field name letter and colon is just optional. There are
abc files which have no space after field name and colon. UltraEdit syntax highlighting is based on words. Which sequence of characters is interpreted as word in a syntax highlighted file is defined by the delimiters in the wordfile listed on line starting with
/Delimiters =. So it is impossible to define strings like
C: or
T: as word in the wordfile to be syntax highlighted in an opened
abc file. UltraEdit supports a syntax highlighting word definition starting with a delimiter, but it does not support a word definition ending with a word delimiter.
UltraEdit does also not support syntax highlighting of words based on context which means for
abc files in which line the word defined in syntax highlighting wordfile is found in the highlighted file. I tried a syntax highlighting for
abc files with single letter words in wordfile, but I could see that it does not make sense. The letters have to many different meanings in
abc files.
The color group
Properties contains the words which are properties of various fields. The
abc files are case-sensitive, but the key signatures are case-insensitive. This makes it difficult to highlight them because of a syntax highlighting definition is either case-sensitive or case-insensitive. Therefore
Properties contains the key signatures in the variants with all letters in lower case, with all letters in upper case and capitalized, in full notation or in abbreviated notation. I am not sure if the key signatures are defined all well by me. I have not understood fully their description.
The color and font style settings for color group
Negative numbers can be configured identical to the standard color group
Numbers or different, whatever the user likes more. I think, a different color would be better for
abc syntax highlighting.
T: is defined as open and as close fold string because of an
abc file can contain multiple tunes each with a tune title. For that reason it could be useful to fold them from tune title line to tune title line with the exception of the last tune (no more tune title line).
The square brackets and the braces are defined for brace matching because of those brackets usually exist in matching pairs in
abc files. This is not the case for round and angle brackets which is the reason that those brackets are not added to the open and close brace strings definition lines.
There is just a single function string definition in the attached wordfile written in legacy syntax supported by UltraEdit for Windows prior v16.00 and UEStudio prior v10.00. It searches with UltraEdit regular expression engine for lines starting with
T: with 0 or more spaces and one or more characters up to either a percent (beginning of line comment) or end of line and tag just the string after
T: and the optional spaces. So this UltraEdit regular expression search string results in listing in
Function List view the tune titles of active
abc file or of all
abc files of a project. The
Function List view context menu option
List for all Project Files must be enabled and an UltraEdit project must be opened with a list of
abc files or with
abc files found in project directory (tree) to get all tune titles of all
abc files of the project listed in
Function List independent on which of those files are also opened in UltraEdit.
The single line
/Function String = "%T: ++^([~%^p]+^)" could be replace also by:
Code: Select all
/Function String = "%^(T:[~%^p]+^)"
/Function String 1 = "%^(C:[~%^p]+^)"
/Function String 2 = "%^(O:[~%^p]+^)"
/Function String 3 = "%^(Z:[~%^p]+^)"
Then the
Function List displays not only the tune titles, but also the composers, origins and transcriptions found in active file or all project files. In this case the field name letter, the colon and the optional space(s) after the colon are included in the strings listed in
Function List view to have a type indication for each displayed string.
The single line
/Function String = "%T: ++^([~%^p]+^)" could be replace also by:
Code: Select all
/TGBegin "Title"
/TGFindStr = "%T: ++^([~%^p]+^)"
/TGEnd
/TGBegin "Composer"
/TGFindStr = "%C: ++^([~%^p]+^)"
/TGEnd
/TGBegin "Origin"
/TGFindStr = "%O: ++^([~%^p]+^)"
/TGEnd
/TGBegin "Transcription"
/TGFindStr = "%Z: ++^([~%^p]+^)"
/TGEnd
This function string definition requires UltraEdit for Windows ≥ v16.00 or UEStudio ≥ v10.00 and the function list should be configured for displaying an hierarchical list on which the group names are displayed, and not a flat list displayed without group names. The
Function List context menu contains the option
Flat List for toggling it if the used version of UltraEdit and UEStudio support a hierarchical function list at all.
Please let me know if you have any further questions which should result in modifications on this wordfile for
abc files.
PS: The good documentation of
abc notation version 2.1 contains a mistake in my opinion. In chapter 7.1 is written about property
subname which can be used also abbreviated with
snm. The abbreviated version is also used four times in the first example in chapter 7. in this documentation. But the example in chapter 13.4 contains property name
sname which is not described anywhere in the whole documentation. I think, the example is not 100% correct and so
sname is not in color group
Properties.