From b8a5504021e0d21310bc603855ac8107828b5759 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 31 Dec 2019 14:05:09 +0100 Subject: Update --- syntax/terraform.vim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'syntax/terraform.vim') diff --git a/syntax/terraform.vim b/syntax/terraform.vim index 452329b9..03b20c2c 100644 --- a/syntax/terraform.vim +++ b/syntax/terraform.vim @@ -7,6 +7,9 @@ if exists('b:current_syntax') finish endif +let s:cpo_save = &cpo +set cpo&vim + " Identifiers are made up of alphanumeric characters, underscores, and " hyphens. if has('patch-7.4.1142') @@ -4863,9 +4866,8 @@ syn match terraValueDec "\<[0-9]\+\([kKmMgG]b\?\)\?\>" syn match terraValueHexaDec "\<0x[0-9a-f]\+\([kKmMgG]b\?\)\?\>" syn match terraBraces "[\[\]]" -""" skip \" in strings. -""" we may also want to pass \\" into a function to escape quotes. -syn region terraValueString start=/"/ skip=/\\\+"/ end=/"/ contains=terraStringInterp +""" skip \" and \\ in strings. +syn region terraValueString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=terraStringInterp syn region terraStringInterp matchgroup=terraBraces start=/\${/ end=/}/ contained contains=ALL syn region terraHereDocText start=/<<-\?\z([a-z0-9A-Z]\+\)/ end=/^\s*\z1/ contains=terraStringInterp @@ -4923,4 +4925,7 @@ hi def link terraValueNull Constant let b:current_syntax = 'terraform' +let &cpo = s:cpo_save +unlet s:cpo_save + endif -- cgit v1.2.3