diff runtime/syntax/zsh.vim @ 7924:00d64eb49ce1

commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 4 20:57:07 2016 +0100 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Thu, 04 Feb 2016 21:00:05 +0100
parents 05cf4cc72a9f
children f16bfe02cef1
line wrap: on
line diff
--- a/runtime/syntax/zsh.vim
+++ b/runtime/syntax/zsh.vim
@@ -2,7 +2,7 @@
 " Language:             Zsh shell script
 " Maintainer:           Christian Brabandt <cb@256bit.org>
 " Previous Maintainer:  Nikolai Weibull <now@bitwi.se>
-" Latest Revision:      2015-12-25
+" Latest Revision:      2016-01-25
 " License:              Vim (see :h license)
 " Repository:		https://github.com/chrisbra/vim-zsh
 
@@ -14,6 +14,7 @@ let s:cpo_save = &cpo
 set cpo&vim
 
 setlocal iskeyword+=-
+setlocal foldmethod=syntax
 
 syn keyword zshTodo             contained TODO FIXME XXX NOTE
 
@@ -307,19 +308,19 @@ syn match   zshNumber           '[+-]\=\
 " TODO: $[...] is the same as $((...)), so add that as well.
 syn cluster zshSubst            contains=zshSubst,zshOldSubst,zshMathSubst
 syn region  zshSubst            matchgroup=zshSubstDelim transparent
-                                \ start='\$(' skip='\\)' end=')' contains=TOP
-syn region  zshParentheses      transparent start='(' skip='\\)' end=')'
+                                \ start='\$(' skip='\\)' end=')' contains=TOP fold
+syn region  zshParentheses      transparent start='(' skip='\\)' end=')' fold
 syn region  zshMathSubst        matchgroup=zshSubstDelim transparent
                                 \ start='\$((' skip='\\)'
                                 \ matchgroup=zshSubstDelim end='))'
                                 \ contains=zshParentheses,@zshSubst,zshNumber,
-                                \ @zshDerefs,zshString keepend
+                                \ @zshDerefs,zshString keepend fold
 syn region  zshBrackets         contained transparent start='{' skip='\\}'
-                                \ end='}'
+                                \ end='}' fold
 syn region  zshSubst            matchgroup=zshSubstDelim start='\${' skip='\\}'
-                                \ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString
+                                \ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString fold
 syn region  zshOldSubst         matchgroup=zshSubstDelim start=+`+ skip=+\\`+
-                                \ end=+`+ contains=TOP,zshOldSubst
+                                \ end=+`+ contains=TOP,zshOldSubst fold
 
 syn sync    minlines=50 maxlines=90
 syn sync    match zshHereDocSync    grouphere   NONE '<<-\=\s*\%(\\\=\S\+\|\(["']\)\S\+\1\)'