From ca6107cfbc1b9994d8a36494965f0b270dc2b77b Mon Sep 17 00:00:00 2001 From: Shadman Date: Sat, 1 May 2021 17:09:05 +0600 Subject: [PATCH] doc: update vim.cmd() (#14450) --- runtime/doc/lua.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 {...}.