URL highlighter for YAML

This commit is contained in:
Christian Nicolai 2011-08-02 17:23:09 +02:00
parent c8bb8774a7
commit 5912526050
1 changed files with 39 additions and 6 deletions

View File

@ -14,6 +14,8 @@
=LocalType fg_310 # brown
=BlockDelim bold blue
=URL cyan
:idle Idle
* idle
"%" directive recolor=-1
@ -25,6 +27,7 @@
"." maybe_block_end1
"*&" maybe_reference
"!" maybe_typecast
"a-zA-Z_" maybe_url mark buffer
:line_comment Comment
* line_comment
@ -94,19 +97,19 @@
:maybe_typecast Idle
* idle noeat
"a-zA-Z_" local_type recolor=-1
"!" builtin_type1
:builtin_type1 Idle
* idle noeat
"a-zA-Z" builtin_type buffer
"!" builtin_type
:builtin_type Idle
* idle noeat
"a-zA-Z" builtin_type2 buffer
:builtin_type2 Idle
* idle noeat strings
"str" type
"float" type
"binary" type
done
"a-zA-Z_" builtin_type
"a-zA-Z_" builtin_type2
:type Type
* idle noeat
@ -114,3 +117,33 @@ done
:local_type LocalType
* idle noeat
"a-zA-Z_" local_type
:maybe_url Idle
* url_scheme_unkwn noeat strings
"ftp" maybe_url2
"http" maybe_url2
"https" maybe_url2
done
"a-zA-Z" maybe_url
:url_scheme_unkwn Idle
* idle noeat markend
:maybe_url2 Idle
* idle noeat markend
":" maybe_url3
:maybe_url3 Idle
* idle noeat markend
"/" maybe_url4
:maybe_url4 Idle
* idle noeat markend
"/" url
:url Idle
* url
" \t\r\n" url_end recolormark noeat
:url_end URL
* idle noeat