Text editing in Verovio Humdrum Viewer uses the ace editor. There are two modes in which the contents can be edited: (1) the initial simple-text editor (2) a vi editor useful to people who know vi/vim. Switch between these two modes by pressing alt-v.
Plain-text mode
The Plain-text editing mode is indicated by a light background, closely matching the background color of the notation area of the page:
When editing Humdrum files, their contents will be colored by syntactic function:
|
|
vi mode
Syntax coloring in vi mode:
|
|
Basic syntax error highlighting
Tab syntax errors
Tabs cannot start a line, end a line, or occur more than once between tokens in the Humdrum syntax. Any of these invalid cases will be highlighted in red:
Space syntax warnings
Generally tokens do not start or end with space characters, and multiple sub-tokens
are separated by a single space (in data formats such as **kern
). When a token starts
or ends with a space, or there is more than one space between subtokens, the space will be highlighted
in blue. Usually this is a syntax error that should be fixed.
Syntax files
Here are the Humdrum syntax parsing/highlighting files for the ace editor:
- mode-humdrum.js: syntax parsing file
- theme-humdrum_light.js light-colored highlighting theme
- theme-humdrum_dark.js dark-colored highlighting theme