@@ -1017,21 +1017,10 @@ vim.call({func}, {...}) *vim.call()*
1017
1017
See also | vim.fn | .
1018
1018
Equivalent to: >
1019
1019
vim.fn[func]({...})
1020
- <
1021
- vim.cmd({cmd} ) *vim.cmd()*
1022
- Executes multiple lines of Vimscript at once. It is an alias to
1023
- | nvim_exec() | , where `output` is set to false. Thus it works identical
1024
- to | :source | .
1025
- See also | ex-cmd-index | .
1026
- Example: >
1027
- vim.cmd('echo 42')
1028
- vim.cmd([[
1029
- augroup My_group
1030
- autocmd!
1031
- autocmd FileType c setlocal cindent
1032
- augroup END
1033
- ]])
1034
- <
1020
+
1021
+ vim.cmd({command} )
1022
+ See | vim.cmd() | .
1023
+
1035
1024
vim.fn.{func} ({...} ) *vim.fn*
1036
1025
Invokes | vim-function | or | user-function | {func} with arguments {...} .
1037
1026
To call autoload functions, use the syntax: >
@@ -1296,6 +1285,34 @@ vim.wo *vim.wo*
1296
1285
==============================================================================
1297
1286
Lua module: vim *lua-vim*
1298
1287
1288
+ cmd({command} ) *vim.cmd()*
1289
+ Execute Vim script commands.
1290
+
1291
+ Example: >
1292
+
1293
+ vim.cmd('echo 42')
1294
+ vim.cmd([[
1295
+ augroup My_group
1296
+ autocmd!
1297
+ autocmd FileType c setlocal cindent
1298
+ augroup END
1299
+ ]])
1300
+ vim.cmd({ cmd = 'echo', args = { '"foo"' } })
1301
+ <
1302
+
1303
+ Parameters: ~
1304
+ {command} string|table Command(s) to execute. If a
1305
+ string, executes multiple lines of Vim script
1306
+ at once. In this case, it is an alias to
1307
+ | nvim_exec() | , where `output` is set to false.
1308
+ Thus it works identical to | :source | . If a
1309
+ table, executes a single command. In this case,
1310
+ it is an alias to | nvim_cmd() | where `opts` is
1311
+ empty.
1312
+
1313
+ See also: ~
1314
+ | ex-cmd-index |
1315
+
1299
1316
*vim.connection_failure_errmsg()*
1300
1317
connection_failure_errmsg({consequence} )
1301
1318
TODO: Documentation
0 commit comments