aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadman <shadmansaleh3@gmail.com>2021-05-01 17:09:05 +0600
committerGitHub <noreply@github.com>2021-05-01 13:09:05 +0200
commitca6107cfbc1b9994d8a36494965f0b270dc2b77b (patch)
tree5d26e622a23004d734dff5934548a5c5722662b5
parent9d4250d43dc83b6c74273e1f45212e2cc6d4fb68 (diff)
downloadrneovim-ca6107cfbc1b9994d8a36494965f0b270dc2b77b.tar.gz
rneovim-ca6107cfbc1b9994d8a36494965f0b270dc2b77b.tar.bz2
rneovim-ca6107cfbc1b9994d8a36494965f0b270dc2b77b.zip
doc: update vim.cmd() (#14450)
-rw-r--r--runtime/doc/lua.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 6d007c0e44..be01966d42 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -841,10 +841,18 @@ vim.call({func}, {...}) *vim.call()*
vim.fn[func]({...})
vim.cmd({cmd}) *vim.cmd()*
- Invokes an Ex command (the ":" commands, Vimscript statements).
+ Executes multiple lines of Vimscript at once. It is an alias to
+ |nvim_exec()|, where `output` is set to false. Thus it works identical
+ to |:source|.
See also |ex-cmd-index|.
Example: >
vim.cmd('echo 42')
+ vim.cmd([[
+ augroup My_group
+ autocmd!
+ autocmd FileType c setlocal cindent
+ augroup END
+ ]])
vim.fn.{func}({...}) *vim.fn*
Invokes |vim-function| or |user-function| {func} with arguments {...}.