annotate runtime/syntax/monk.vim @ 34623:65e7eaf68f19 v9.1.0200

patch 9.1.0200: `gj`/`gk` not skipping over outer virtual text lines Commit: https://github.com/vim/vim/commit/b2d124c6258ff41e1f951bf39a4afc386d79ddc4 Author: Dylan Thacker-Smith <dylan.ah.smith@gmail.com> Date: Sun Mar 24 09:43:25 2024 +0100 patch 9.1.0200: `gj`/`gk` not skipping over outer virtual text lines Problem: `gj`/`gk` was updating the desired cursor virtual column to the outer virtual text, even though the actual cursor position was moved to not be on the virtual text, leading the need to do an extra `gj`/`gk` to move past each virtual text line. (rickhowe) Solution: Exclude the outer virtual text when getting the line length for moving the cursor with `gj`/`gk`, so that no extra movement is needed to skip over virtual text lines. (Dylan Thacker-Smith) fixes: #12028 related: #14262 Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 24 Mar 2024 10:00:05 +0100
parents 46763b01cd9a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Monk (See-Beyond Technologies)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Mike Litherland <litherm@ccf.org>
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Last Change: 2012 Feb 03 by Thilo Six
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " This syntax file is good enough for my needs, but others
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " may desire more features. Suggestions and bug reports
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " are solicited by the author (above).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " Originally based on the Scheme syntax file by:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Maintainer: Dirk van Deun <dvandeun@poboxes.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " Last Change: April 30, 1998
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " In fact it's almost identical. :)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " The original author's notes:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " This script incorrectly recognizes some junk input as numerals:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " parsing the complete system of Scheme numerals using the pattern
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " language is practically impossible: I did a lax approximation.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Initializing:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3312
diff changeset
24 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3312
diff changeset
25 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
29 let s:cpo_save = &cpo
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
30 set cpo&vim
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
31
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " Fascist highlighting: everything that doesn't fit the rules is an error...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match monkError oneline ![^ \t()";]*!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match monkError oneline ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Quoted and backquoted stuff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn region monkQuoted matchgroup=Delimiter start="['`]" end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region monkQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn region monkQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn region monkStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn region monkStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn region monkUnquote matchgroup=Delimiter start="," end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn region monkUnquote matchgroup=Delimiter start=",@" end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn region monkUnquote matchgroup=Delimiter start=",(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn region monkUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn region monkUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn region monkUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " R5RS Scheme Functions and Syntax:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3312
diff changeset
60 setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword monkSyntax lambda and or if cond case define let let* letrec
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword monkSyntax begin do delay set! else =>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword monkSyntax quote quasiquote unquote unquote-splicing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword monkSyntax define-syntax let-syntax letrec-syntax syntax-rules
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword monkFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword monkFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword monkFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword monkFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword monkFunc cddaar cddadr cdddar cddddr null? list? list length
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword monkFunc append reverse list-ref memq memv member assq assv assoc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword monkFunc symbol? symbol->string string->symbol number? complex?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword monkFunc real? rational? integer? exact? inexact? = < > <= >=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword monkFunc zero? positive? negative? odd? even? max min + * - / abs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword monkFunc quotient remainder modulo gcd lcm numerator denominator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword monkFunc floor ceiling truncate round rationalize exp log sin cos
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword monkFunc tan asin acos atan sqrt expt make-rectangular make-polar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword monkFunc real-part imag-part magnitude angle exact->inexact
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword monkFunc inexact->exact number->string string->number char=?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword monkFunc char-ci=? char<? char-ci<? char>? char-ci>? char<=?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword monkFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword monkFunc char-numeric? char-whitespace? char-upper-case?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword monkFunc char-lower-case?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn keyword monkFunc char->integer integer->char char-upcase char-downcase
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword monkFunc string? make-string string string-length string-ref
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn keyword monkFunc string-set! string=? string-ci=? string<? string-ci<?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn keyword monkFunc string>? string-ci>? string<=? string-ci<=? string>=?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn keyword monkFunc string-ci>=? substring string-append vector? make-vector
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn keyword monkFunc vector vector-length vector-ref vector-set! procedure?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn keyword monkFunc apply map for-each call-with-current-continuation
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn keyword monkFunc call-with-input-file call-with-output-file input-port?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn keyword monkFunc output-port? current-input-port current-output-port
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn keyword monkFunc open-input-file open-output-file close-input-port
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn keyword monkFunc close-output-port eof-object? read read-char peek-char
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn keyword monkFunc write display newline write-char call/cc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn keyword monkFunc list-tail string->list list->string string-copy
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn keyword monkFunc string-fill! vector->list list->vector vector-fill!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword monkFunc force with-input-from-file with-output-to-file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn keyword monkFunc char-ready? load transcript-on transcript-off eval
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn keyword monkFunc dynamic-wind port? values call-with-values
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn keyword monkFunc monk-report-environment null-environment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn keyword monkFunc interaction-environment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 " Keywords specific to STC's implementation
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn keyword monkFunc $event-clear $event-parse $event->string $make-event-map
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn keyword monkFunc $resolve-event-definition change-pattern copy copy-strip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn keyword monkFunc count-data-children count-map-children count-rep data-map
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn keyword monkFunc duplicate duplicate-strip file-check file-lookup get
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn keyword monkFunc insert list-lookup node-has-data? not-verify path?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn keyword monkFunc path-defined-as-repeating? path-nodeclear path-nodedepth
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn keyword monkFunc path-nodename path-nodeparentname path->string path-valid?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn keyword monkFunc regex string->path timestamp uniqueid verify
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 " Keywords from the Monk function library (from e*Gate 4.1 programmers ref)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn keyword monkFunc allcap? capitalize char-punctuation? char-substitute
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn keyword monkFunc char-to-char conv count-used-children degc->degf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn keyword monkFunc diff-two-dates display-error empty-string? fail_id
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn keyword monkFunc fail_id_if fail_translation fail_translation_if
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn keyword monkFunc find-get-after find-get-before get-timestamp julian-date?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn keyword monkFunc julian->standard leap-year? map-string not-empty-string?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn keyword monkFunc standard-date? standard->julian string-begins-with?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn keyword monkFunc string-contains? string-ends-with? string-search-from-left
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 syn keyword monkFunc string-search-from-right string->ssn strip-punct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn keyword monkFunc strip-string substring=? symbol-table-get symbol-table-put
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn keyword monkFunc trim-string-left trim-string-right valid-decimal?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syn keyword monkFunc valid-integer? verify-type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 " Writing out the complete description of Scheme numerals without
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 " using variables is a day's work for a trained secretary...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 " This is a useful lax approximation:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 syn match monkNumber oneline "[-#+0-9.][-#+/0-9a-f@i.boxesfdl]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 syn match monkError oneline ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t()";][^ \t()";]*!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 syn match monkOther oneline ![+-][ \t()";]!me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syn match monkOther oneline ![+-]$!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 " ... so that a single + or -, inside a quoted context, would not be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 " interpreted as a number (outside such contexts, it's a monkFunc)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 syn match monkDelimiter oneline !\.[ \t()";]!me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 syn match monkDelimiter oneline !\.$!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 " ... and a single dot is not a number but a delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 " Simple literals:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 syn match monkBoolean oneline "#[tf]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 syn match monkError oneline !#[tf][^ \t()";]\+!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 syn match monkChar oneline "#\\"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 syn match monkChar oneline "#\\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 syn match monkError oneline !#\\.[^ \t()";]\+!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 syn match monkChar oneline "#\\space"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 syn match monkError oneline !#\\space[^ \t()";]\+!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 syn match monkChar oneline "#\\newline"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 syn match monkError oneline !#\\newline[^ \t()";]\+!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 " This keeps all other stuff unhighlighted, except *stuff* and <stuff>:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 syn match monkOther oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 syn match monkError oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 syn match monkOther oneline "\.\.\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 syn match monkError oneline !\.\.\.[^ \t()";]\+!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 " ... a special identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[ \t()";],me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*$,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 syn match monkError oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t()";],me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 syn match monkError oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 " Monk input and output structures
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 syn match monkSyntax oneline "\(\~input\|\[I\]->\)[^ \t]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 syn match monkFunc oneline "\(\~output\|\[O\]->\)[^ \t]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 " Non-quoted lists, and strings:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 syn region monkStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 syn region monkStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 syn region monkString start=+"+ skip=+\\[\\"]+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 " Comments:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 syn match monkComment ";.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 " Synchronization and the wrapping up...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 syn sync match matchPlace grouphere NONE "^[^ \t]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 " ... i.e. synchronize on a line that starts at the left margin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3312
diff changeset
197 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
199 hi def link monkSyntax Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
200 hi def link monkFunc Function
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
202 hi def link monkString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
203 hi def link monkChar Character
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
204 hi def link monkNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
205 hi def link monkBoolean Boolean
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
207 hi def link monkDelimiter Delimiter
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
208 hi def link monkConstant Constant
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
210 hi def link monkComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
211 hi def link monkError Error
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 let b:current_syntax = "monk"
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
215
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
216 let &cpo = s:cpo_save
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
217 unlet s:cpo_save