diff options
author | Famiu Haque <famiuhaque@protonmail.com> | 2022-09-28 17:43:18 +0600 |
---|---|---|
committer | Famiu Haque <famiuhaque@protonmail.com> | 2022-09-29 19:31:40 +0600 |
commit | e46eef75ac2c3336928269e28a1fa138f7327207 (patch) | |
tree | 819473574d2f028a0dbce7272f78900262f0a352 /runtime/doc/api.txt | |
parent | d9f5940997d8312c2c1612b0457de17b9720d312 (diff) | |
download | rneovim-e46eef75ac2c3336928269e28a1fa138f7327207.tar.gz rneovim-e46eef75ac2c3336928269e28a1fa138f7327207.tar.bz2 rneovim-e46eef75ac2c3336928269e28a1fa138f7327207.zip |
feat(nvim_cmd): allow using first argument as count
Allows `nvim_cmd` to use the first argument as count for applicable
commands. Also adds support for non-String arguments to `nvim_cmd`.
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r-- | runtime/doc/api.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 59d1d36be9..9515dea9a2 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -1697,7 +1697,13 @@ nvim_cmd({*cmd}, {*opts}) *nvim_cmd()* of a String. This allows for easier construction and manipulation of an Ex command. This also allows for things such as having spaces inside a command argument, expanding filenames in a command that otherwise doesn't - expand filenames, etc. + expand filenames, etc. Command arguments may also be Number, Boolean or + String. + + The first argument may also be used instead of count for commands that + support it in order to make their usage simpler with |vim.cmd()|. For + example, instead of `vim.cmd.bdelete{ count = 2 }`, you may do + `vim.cmd.bdelete(2)`. On execution error: fails with VimL error, updates v:errmsg. |