Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Pepin
vim-syntax
Commits
6324f0ef
Commit
6324f0ef
authored
Dec 29, 2016
by
Martin Pépin
Browse files
Colorizes functions
parent
f0eb3e1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
mj.vim
View file @
6324f0ef
...
...
@@ -14,12 +14,16 @@ syntax match Error "\]"
syntax
match
Error
"\*)"
" Functions
syntax
match
Function
"[a-zA-Z][a-zA-Z0-9_]*[ \t\n]*\(<[^>]\+>\)\@="
syntax
match
Function
"[a-zA-Z][a-zA-Z0-9_]*[ \t\n]*\(([^\*]\)\@="
" Static type parameters
syntax
region Type start
=
"<"
end
=
">"
syntax
match
Type
":\[[^\]]\+\]"
" Builtin functions
syntax
keyword Identifier mux
and
or
xor
not
syntax
keyword Identifier mux
and
or
xor
not
reg
" Builtin operators and symbols
syntax
match
Statement
"\*"
...
...
@@ -35,19 +39,19 @@ syntax match Statement "="
syntax
match
Number
"\<\d\+\>"
" If statements
syntax
region None matchgroup
=
Statement start
=
"\<if\>"
matchgroup
=
Statement end
=
"\<end if\>"
contains
=
ALL
BUT
,
Identifier
syntax
region None matchgroup
=
Statement start
=
"\<if\>"
matchgroup
=
Statement end
=
"\<end if\>"
contains
=
ALL
syntax
keyword Statement then
else
" Block definition
syntax
region None matchgroup
=
Statement start
=
"\<where\>"
matchgroup
=
Statement end
=
"\<end where\>"
contains
=
ALL
BUT
,
Identifier
syntax
region None matchgroup
=
Statement start
=
"\<where\>"
matchgroup
=
Statement end
=
"\<end where\>"
contains
=
ALL
" Special highlight for require: not a Minijazz standard but used in our custom
" implementation
syntax
match
Include
"^require"
" Brackets and co
syntax
region None matchgroup
=
Keyword start
=
"("
matchgroup
=
Keyword end
=
")"
contains
=
ALL
BUT
,
Identifier
syntax
region None matchgroup
=
Keyword start
=
"\["
matchgroup
=
Keyword end
=
"\]"
contains
=
ALL
BUT
,
Identifier
syntax
region None matchgroup
=
Keyword start
=
"("
matchgroup
=
Keyword end
=
")"
contains
=
ALL
syntax
region None matchgroup
=
Keyword start
=
"\["
matchgroup
=
Keyword end
=
"\]"
contains
=
ALL
" Constants
syntax
keyword Constant false true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment