YAML: highlight first key: of the line different

This commit is contained in:
cn 2011-10-22 22:36:28 +02:00
parent 2b59cf9e90
commit d88c044fb9
1 changed files with 22 additions and 5 deletions

View File

@ -13,11 +13,12 @@
=Reference yellow =Reference yellow
=LocalType fg_310 # brown =LocalType fg_310 # brown
=BlockDelim bold blue =BlockDelim bold blue
=Key fg_310
=BadTab inverse red =BadTab inverse red
:line_start Idle :line_start Idle
* idle noeat * maybe_key noeat
"\t" bad_tab recolor=-1 "\t" bad_tab recolor=-1
" " line_start " " line_start
@ -29,11 +30,27 @@
"'" string_sq_1 recolor=-1 "'" string_sq_1 recolor=-1
"\"" string_dq_1 recolor=-1 "\"" string_dq_1 recolor=-1
"{[]}" brace recolor=-1 "{[]}" brace recolor=-1
"-" maybe_block1
"." maybe_block_end1
"*&" maybe_reference "*&" maybe_reference
"!" maybe_typecast "!" maybe_typecast
:maybe_key Idle
* maybe_key1 mark
"\n%#{[]}." idle noeat
"-" maybe_block1 mark
"." maybe_block_end1
:maybe_key1 Idle
* idle noeat
":" key
" a-zA-Z0-9_-" maybe_key1
# necessary to include the :
:key Idle
* key_end noeat recolormark
:key_end Key
* idle noeat
# mark bad tabs until the first non-whitespace # mark bad tabs until the first non-whitespace
:bad_tab BadTab :bad_tab BadTab
* line_start noeat * line_start noeat
@ -74,11 +91,11 @@
"\n" string_dq recolor=-2 "\n" string_dq recolor=-2
:maybe_block1 Idle :maybe_block1 Idle
* idle noeat * maybe_key1 noeat
"-" maybe_block2 "-" maybe_block2
:maybe_block2 Idle :maybe_block2 Idle
* idle noeat * maybe_key1 noeat
"-" block recolor=-3 "-" block recolor=-3
:block BlockDelim :block BlockDelim