From 4e47568f89c4b937077d017baddd79de012694d8 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 1 Feb 2017 15:26:34 -0500 Subject: vim-patch:802a0d9 Updated runtime files. https://github.com/vim/vim/commit/802a0d902fca423acb15f835d7b09183883d79a0 --- runtime/syntax/sh.vim | 69 +++++++++++++++++++++------------------------------ 1 file changed, 28 insertions(+), 41 deletions(-) (limited to 'runtime/syntax/sh.vim') diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index c51bd9aa45..711971ea4a 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,15 +2,15 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell " Previous Maintainer: Lennart Schultz -" Last Change: May 02, 2016 -" Version: 151 +" Last Change: Jun 10, 2016 +" Version: 152 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) " For version 5.x: Clear all syntax items {{{1 " For version 6.x: Quit when a syntax file was already loaded -if version < 600 +if v:version < 600 syntax clear elseif exists("b:current_syntax") finish @@ -173,7 +173,7 @@ if exists("b:is_kornshell") || exists("b:is_bash") " Touch: {{{1 " ===== - syn match shTouch '\[^;#]*' skipwhite nextgroup=shTouchList contains=shTouchCmd + syn match shTouch '\[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd syn match shTouchCmd '\' contained endif @@ -333,9 +333,10 @@ endif "================================ syn match shNumber "\<\d\+\>#\=" syn match shNumber "-\=\.\=\d\+\>#\=" -syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained +syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained if exists("b:is_bash") - syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained + syn match shSpecial "[^\\]\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained + syn match shSpecial "^\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained endif if exists("b:is_bash") syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial @@ -346,11 +347,13 @@ elseif !exists("g:sh_no_error") endif syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@