comparison 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
comparison
equal deleted inserted replaced
7923:dacd57ae37f5 7924:00d64eb49ce1
1 " Vim syntax file 1 " Vim syntax file
2 " Language: Zsh shell script 2 " Language: Zsh shell script
3 " Maintainer: Christian Brabandt <cb@256bit.org> 3 " Maintainer: Christian Brabandt <cb@256bit.org>
4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> 4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
5 " Latest Revision: 2015-12-25 5 " Latest Revision: 2016-01-25
6 " License: Vim (see :h license) 6 " License: Vim (see :h license)
7 " Repository: https://github.com/chrisbra/vim-zsh 7 " Repository: https://github.com/chrisbra/vim-zsh
8 8
9 if exists("b:current_syntax") 9 if exists("b:current_syntax")
10 finish 10 finish
12 12
13 let s:cpo_save = &cpo 13 let s:cpo_save = &cpo
14 set cpo&vim 14 set cpo&vim
15 15
16 setlocal iskeyword+=- 16 setlocal iskeyword+=-
17 setlocal foldmethod=syntax
17 18
18 syn keyword zshTodo contained TODO FIXME XXX NOTE 19 syn keyword zshTodo contained TODO FIXME XXX NOTE
19 20
20 syn region zshComment oneline start='\%(^\|\s*\)#' end='$' 21 syn region zshComment oneline start='\%(^\|\s*\)#' end='$'
21 \ contains=zshTodo,@Spell 22 \ contains=zshTodo,@Spell
305 syn match zshNumber '[+-]\=\d\+\.\d\+\>' 306 syn match zshNumber '[+-]\=\d\+\.\d\+\>'
306 307
307 " TODO: $[...] is the same as $((...)), so add that as well. 308 " TODO: $[...] is the same as $((...)), so add that as well.
308 syn cluster zshSubst contains=zshSubst,zshOldSubst,zshMathSubst 309 syn cluster zshSubst contains=zshSubst,zshOldSubst,zshMathSubst
309 syn region zshSubst matchgroup=zshSubstDelim transparent 310 syn region zshSubst matchgroup=zshSubstDelim transparent
310 \ start='\$(' skip='\\)' end=')' contains=TOP 311 \ start='\$(' skip='\\)' end=')' contains=TOP fold
311 syn region zshParentheses transparent start='(' skip='\\)' end=')' 312 syn region zshParentheses transparent start='(' skip='\\)' end=')' fold
312 syn region zshMathSubst matchgroup=zshSubstDelim transparent 313 syn region zshMathSubst matchgroup=zshSubstDelim transparent
313 \ start='\$((' skip='\\)' 314 \ start='\$((' skip='\\)'
314 \ matchgroup=zshSubstDelim end='))' 315 \ matchgroup=zshSubstDelim end='))'
315 \ contains=zshParentheses,@zshSubst,zshNumber, 316 \ contains=zshParentheses,@zshSubst,zshNumber,
316 \ @zshDerefs,zshString keepend 317 \ @zshDerefs,zshString keepend fold
317 syn region zshBrackets contained transparent start='{' skip='\\}' 318 syn region zshBrackets contained transparent start='{' skip='\\}'
318 \ end='}' 319 \ end='}' fold
319 syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}' 320 syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}'
320 \ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString 321 \ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString fold
321 syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+ 322 syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+
322 \ end=+`+ contains=TOP,zshOldSubst 323 \ end=+`+ contains=TOP,zshOldSubst fold
323 324
324 syn sync minlines=50 maxlines=90 325 syn sync minlines=50 maxlines=90
325 syn sync match zshHereDocSync grouphere NONE '<<-\=\s*\%(\\\=\S\+\|\(["']\)\S\+\1\)' 326 syn sync match zshHereDocSync grouphere NONE '<<-\=\s*\%(\\\=\S\+\|\(["']\)\S\+\1\)'
326 syn sync match zshHereDocEndSync groupthere NONE '^\s*EO\a\+\>' 327 syn sync match zshHereDocEndSync groupthere NONE '^\s*EO\a\+\>'
327 328