mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 23:48:32 +00:00
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.
This commit is contained in:
@@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user