comparison runtime/syntax/testdir/input/vim_ex_execute.vim @ 34563:98d8ef6b57c9

runtime(vim): Update base-syntax, improve :echo and :execute highlighting (#14199) Commit: https://github.com/vim/vim/commit/61887b3d6fd8b441c90416ea7855e1fe5a9ae32c Author: dkearns <dougkearns@gmail.com> Date: Fri Mar 15 23:45:48 2024 +1100 runtime(vim): Update base-syntax, improve :echo and :execute highlighting (https://github.com/vim/vim/issues/14199) Improve :echo and :execute highlighting. - Add better line-continuation support for both commands. - Improve the :execute command's expression argument matching. - Remove the fix for issue #9987 as this is now handled by correctly matching the parens in :echo (...) as operator parens. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Fri, 15 Mar 2024 14:00:05 +0100
parents
children
comparison
equal deleted inserted replaced
34562:4a9250f5cf09 34563:98d8ef6b57c9
1 " Vim :execute command
2
3 " :help :execute
4
5 execute "buffer" nextbuf
6 execute "normal" count .. "w"
7 execute '!ls' | echo "theend"
8 execute "normal ixxx\<Esc>"
9 execute "e " .. fnameescape(filename)
10 execute "!ls " .. shellescape(filename, 1)
11 if 0
12 execute 'while i > 5'
13 echo "test"
14 endwhile
15 endif
16 execute 'while i < 5 | echo i | let i = i + 1 | endwhile'
17
18 " following command is :|"
19 execute "call Foo()" | |
20
21 execute "call"
22 "\ comment
23 \ "Foo()"
24
25 execute
26 \ "call"
27 "\ comment
28 \ "Foo()"
29
30 " :execute without {expr}
31 execute| echo "Foo"
32
33 " trailing comment needs |
34 execute "foo" | " comment
35
36
37 " Issue #9987 (parenthesised argument - not a function call)
38
39 " FIXME: execute is ex command not builtin function
40 let foo = {'arg': "call Foo()"}
41 execute (foo.arg)