Commit b105ccd2 authored by Petr Špaček's avatar Petr Špaček

Vim syntax: fix folding of entries and ranges

Vim Keyword has higher priority than Region. This broke folding.
Now the ENTRY_BEGIN (and company) is highlighted using matchgroup= trick
instead of Keyword so folding works.
parent 943923db
......@@ -5,12 +5,12 @@
" au BufRead,BufNewFile *.stc set foldmethod=syntax
syntax keyword Keyword MATCH STEP
syntax keyword Structure CONFIG_END ENTRY_BEGIN ENTRY_END RANGE_BEGIN RANGE_END
syntax keyword Structure CONFIG_END
syntax keyword Function CHECK_ANSWER QUERY TIME_PASSES
syntax region deckardEntry start="ENTRY_BEGIN" end="ENTRY_END" fold transparent
syntax region deckardRange start="RANGE_BEGIN" end="RANGE_END" fold transparent
syntax region deckardScenario start="SCENARIO_BEGIN" end="SCENARIO_END" fold transparent
syntax region deckardEntry matchgroup=Structure start="ENTRY_BEGIN" end="ENTRY_END" fold transparent
syntax region deckardRange matchgroup=Structure start="RANGE_BEGIN" end="RANGE_END" fold transparent
syntax region deckardScenario matchgroup=Structure start="SCENARIO_BEGIN" end="SCENARIO_END" fold transparent
syntax match deckardSection 'SECTION \+[^ ]\+'
syntax match deckardReply 'REPLY.*'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment