Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make syntax regions foldable #7

Merged
merged 3 commits into from
Oct 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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