Skip to content

Commit

Permalink
Make syntax regions foldable (#7)
Browse files Browse the repository at this point in the history
* Make VCL syntax foldable

* Syntax issue

* foldmethod set to syntax
  • Loading branch information
jwadolowski authored and fgsch committed Oct 31, 2019
1 parent 345458c commit e6a5c0c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions syntax/vcl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ endif
syn include syntax/html.vim

syn region vclBlock start="{" end="}"
\ transparent contains=ALLBUT,vclKeywordTop
\ transparent contains=ALLBUT,vclKeywordTop fold
syn match vclComment "#.*$"
syn match vclComment "//.*$"
syn region vclComment start="/\*" end="\*/"
syn region vclComment start="/\*" end="\*/" fold
syn keyword vclConditional elif else elseif elsif if contained
syn keyword vclConstant true false now contained
syn region vclInlineC start="C{" end="}C"
syn region vclInlineC start="C{" end="}C" fold
syn keyword vclKeyword include
syn keyword vclKeyword ban call error hash_data new contained
syn keyword vclKeyword regsub regsuball return rollback contained
Expand Down Expand Up @@ -48,4 +48,6 @@ hi def link vclConditional Conditional

let b:current_syntax = "vcl"

setlocal foldmethod=syntax

" vim:ts=8

0 comments on commit e6a5c0c

Please sign in to comment.