From c7b7ab76def428f2ce6fd82c8efb6f475e06ce1a Mon Sep 17 00:00:00 2001 From: jwadolowski <6334715+jwadolowski@users.noreply.github.com> Date: Thu, 31 Oct 2019 23:04:26 +0100 Subject: [PATCH 1/3] Make VCL syntax foldable --- syntax/vcl.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/syntax/vcl.vim b/syntax/vcl.vim index 1e81870..3ce1fac 100644 --- a/syntax/vcl.vim +++ b/syntax/vcl.vim @@ -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 @@ -47,5 +47,6 @@ hi def link vclVariable Type hi def link vclConditional Conditional let b:current_syntax = "vcl" +let b:foldmethod = "syntax" " vim:ts=8 From 0504bd59dba72143df7e9732d36829c044fdfa96 Mon Sep 17 00:00:00 2001 From: jwadolowski <6334715+jwadolowski@users.noreply.github.com> Date: Thu, 31 Oct 2019 23:07:46 +0100 Subject: [PATCH 2/3] Syntax issue --- syntax/vcl.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/vcl.vim b/syntax/vcl.vim index 3ce1fac..fe86e92 100644 --- a/syntax/vcl.vim +++ b/syntax/vcl.vim @@ -47,6 +47,6 @@ hi def link vclVariable Type hi def link vclConditional Conditional let b:current_syntax = "vcl" -let b:foldmethod = "syntax" +let b:foldmethod=syntax " vim:ts=8 From 6cd58c024c9b2ccf45be121c8f31aa156411a603 Mon Sep 17 00:00:00 2001 From: jwadolowski <6334715+jwadolowski@users.noreply.github.com> Date: Thu, 31 Oct 2019 23:14:25 +0100 Subject: [PATCH 3/3] foldmethod set to syntax --- syntax/vcl.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syntax/vcl.vim b/syntax/vcl.vim index fe86e92..1ca1213 100644 --- a/syntax/vcl.vim +++ b/syntax/vcl.vim @@ -47,6 +47,7 @@ hi def link vclVariable Type hi def link vclConditional Conditional let b:current_syntax = "vcl" -let b:foldmethod=syntax + +setlocal foldmethod=syntax " vim:ts=8