update note about vim.cmd

closes #61
pull/64/head
Timothée Sterle 3 years ago
parent b38a3bff9c
commit f56cea7de8
No known key found for this signature in database
GPG Key ID: 136D558122196ED5

@ -433,10 +433,19 @@ vim.api.nvim_command('set nonumber')
vim.api.nvim_command('%s/foo/bar/g')
```
Note: `vim.cmd` is a shorter alias for this function
### vim.cmd()
Alias for `vim.api.nvim_exec()`. Only the command argument is needed, `output` is always set to `false`.
```lua
vim.cmd('buffers')
vim.cmd([[
let g:multiline =<< EOF
foo
bar
baz
EOF
]])
```
#### Tips

@ -543,10 +543,20 @@ the command to execute.
vim.api.nvim_command('%s/foo/bar/g')
<
Note: `vim.cmd` is a shorter alias for this function
vim.cmd()~
Alias for `vim.api.nvim_exec()`. Only the command argument is needed,
`output` is always set to `false`.
>
vim.cmd('buffers')
vim.cmd([[
let g:multiline =<< EOF
foo
bar
baz
EOF
]])
<
Tips~

Loading…
Cancel
Save