summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/testdir/input/vim_ex_execute.vim
blob: 2ec507e1c114d2c87dbc9992f4e9b61528a3b970 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
" Vim :execute command

" :help :execute

execute "buffer" nextbuf
execute "normal" count .. "w"
execute '!ls' | echo "theend"
execute "normal ixxx\<Esc>"
execute "e " .. fnameescape(filename)
execute "!ls " .. shellescape(filename, 1)
if 0
 execute 'while i > 5'
  echo "test"
 endwhile
endif
execute 'while i < 5 | echo i | let i = i + 1 | endwhile'

" following command is :|"
execute "call Foo()" | |

execute "call"
      "\ comment
      \ "Foo()"

execute
      \ "call"
      "\ comment
      \ "Foo()"

" :execute without {expr}
execute| echo "Foo"

" trailing comment needs |
execute "foo" | " comment


" Issue #9987 (parenthesised argument - not a function call)

" FIXME: execute is ex command not builtin function
let foo = {'arg': "call Foo()"}
execute (foo.arg)