diff options
| author | Famiu Haque <famiuhaque@protonmail.com> | 2022-05-08 17:39:45 +0600 |
|---|---|---|
| committer | Famiu Haque <famiuhaque@protonmail.com> | 2022-05-11 13:12:16 +0600 |
| commit | dfcc58466505f7fb5f62d636a67facaeea143285 (patch) | |
| tree | a8aa50a698d1f18fbc800b1c54a35169184c6c3b /src/nvim/api/keysets.lua | |
| parent | 77863b8e96324bc9e575af7f3f1b7e5de90fbadb (diff) | |
| download | rneovim-dfcc58466505f7fb5f62d636a67facaeea143285.tar.gz rneovim-dfcc58466505f7fb5f62d636a67facaeea143285.tar.bz2 rneovim-dfcc58466505f7fb5f62d636a67facaeea143285.zip | |
feat(api): add `nvim_cmd`
Adds the API function `nvim_cmd` which allows executing an Ex-command through a Dictionary which can have the same values as the return value of `nvim_parse_cmd()`. This makes it much easier to do things like passing arguments with a space to commands that otherwise may not allow it, or to make commands interpret certain characters literally when they otherwise would not.
Diffstat (limited to 'src/nvim/api/keysets.lua')
| -rw-r--r-- | src/nvim/api/keysets.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/nvim/api/keysets.lua b/src/nvim/api/keysets.lua index 5baffaf505..78f8ed3cca 100644 --- a/src/nvim/api/keysets.lua +++ b/src/nvim/api/keysets.lua @@ -155,5 +155,44 @@ return { create_augroup = { "clear"; }; + cmd = { + "cmd"; + "range"; + "count"; + "reg"; + "bang"; + "args"; + "magic"; + "mods"; + "nargs"; + "addr"; + "nextcmd"; + }; + cmd_magic = { + "file"; + "bar"; + }; + cmd_mods = { + "silent"; + "emsg_silent"; + "sandbox"; + "noautocmd"; + "browse"; + "confirm"; + "hide"; + "keepalt"; + "keepjumps"; + "keepmarks"; + "keeppatterns"; + "lockmarks"; + "noswapfile"; + "tab"; + "verbose"; + "vertical"; + "split"; + }; + cmd_opts = { + "output"; + }; } |