From 21ce159e05615fd139c564b734a4bffc9f3fdc4b Mon Sep 17 00:00:00 2001 From: dkearns Date: Mon, 29 Jan 2024 04:54:08 +1100 Subject: runtime(vim): Update syntax and ftplugin files (#13924) Improve matching of line-continuations and interspersed comments. These are now also matched in multiline syntax command patterns, dictionary literals, and parenthesised expressions and argument lists. Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- .../syntax/testdir/input/vim_line_continuation.vim | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 runtime/syntax/testdir/input/vim_line_continuation.vim (limited to 'runtime/syntax/testdir/input/vim_line_continuation.vim') diff --git a/runtime/syntax/testdir/input/vim_line_continuation.vim b/runtime/syntax/testdir/input/vim_line_continuation.vim new file mode 100644 index 0000000000..a32666af34 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_line_continuation.vim @@ -0,0 +1,49 @@ +" Vim line continuations with interspersed comments + +function Foo( + "\ param a + \ a, + "\ param b + \ b, + "\ param c + \ c + \) + echomsg + "\ start string + \ $" + "\ print a + \ a = {a:a}, + "\ print b + \ b = {a:b}, + "\ print c + \ c = {a:c} + "\ end string + \" +endfunction + +call Foo( + "\ arg 1 + \ 11, + "\ arg 2 + \ 22, + "\ arg 3 + \ 33 + \) + +let dict = #{ + "\ pair 1 + \ a: 1, + "\ pair 2 + \ b: 2, + "\ pair 3 + \ c: 3 + \} + +let array = [ + "\ element 1 + \ 1, + "\ element 2 + \ 2, + "\ element 3 + \ 3 + \] -- cgit v1.2.3