mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-14 14:57:09 +03:00
6a2032f5b0
This allows for commenting or uncommenting a line or a bunch of lines with a single keystroke (default binding: M-3). The characters used for commenting/uncommenting are specified by the active syntax file. Reviewed-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Mike Scalora <mike@scalora.org>
30 lines
847 B
Plaintext
30 lines
847 B
Plaintext
## Syntax highlighting for OCaml.
|
|
|
|
syntax "ocaml" "\.mli?$"
|
|
comment "(*|*)"
|
|
|
|
# Uid:
|
|
color red "\<[A-Z][0-9a-z_]{2,}\>"
|
|
# Declarations:
|
|
color green "\<(let|val|method|in|and|rec|private|virtual|constraint)\>"
|
|
# Structure items:
|
|
color red "\<(type|open|class|module|exception|external)\>"
|
|
# Patterns:
|
|
color blue "\<(fun|function|functor|match|try|with)\>"
|
|
# Pattern modifiers:
|
|
color yellow "\<(as|when|of)\>"
|
|
# Conditions:
|
|
color cyan "\<(if|then|else)\>"
|
|
# Blocks:
|
|
color magenta "\<(begin|end|object|struct|sig|for|while|do|done|to|downto)\>"
|
|
# Constants:
|
|
color green "\<(true|false)\>"
|
|
# Modules/classes:
|
|
color green "\<(include|inherit|initializer)\>"
|
|
# Expression modifiers:
|
|
color yellow "\<(new|ref|mutable|lazy|assert|raise)\>"
|
|
# Comments:
|
|
color white start="\(\*" end="\*\)"
|
|
# Strings: (no multiline handling yet)
|
|
color brightblack ""[^\"]*""
|