aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/zsh.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-06-07 10:32:28 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-06-07 10:32:28 -0400
commit8849c209cc0ae94d60a814b55397d80c2c16a185 (patch)
tree28c9274437a8ec9d4f79c6cb5a99d4da2763c5c7 /runtime/syntax/zsh.vim
parentd9660184665a3e3bac5feecb4b4b5680012329d4 (diff)
parent18cbe74af75c69e20dce9e2589649dab4b6ae81e (diff)
downloadrneovim-8849c209cc0ae94d60a814b55397d80c2c16a185.tar.gz
rneovim-8849c209cc0ae94d60a814b55397d80c2c16a185.tar.bz2
rneovim-8849c209cc0ae94d60a814b55397d80c2c16a185.zip
Merge #4888 from jamessan/vim-13d5aee
vim-patch:13d5aee,705ada1,298b440,5e9b2fa,7c764f7,681baaf,cbebd48
Diffstat (limited to 'runtime/syntax/zsh.vim')
-rw-r--r--runtime/syntax/zsh.vim15
1 files changed, 8 insertions, 7 deletions
diff --git a/runtime/syntax/zsh.vim b/runtime/syntax/zsh.vim
index 162577669f..25d4cd4936 100644
--- 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 '[+-]\=\d\+\.\d\+\>'
" 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\)'