mirror of
https://github.com/neovim/neovim.git
synced 2026-07-30 12:28:06 +00:00
lua: make vim.cmd an alias of vim.api.nvim_exec() (#14401)
Previously vim.cmd was an alias of nvim_command(). From now on it is an alias of nvim_exec().
This commit is contained in:
@@ -309,7 +309,9 @@ setmetatable(vim, {
|
||||
})
|
||||
|
||||
-- An easier alias for commands.
|
||||
vim.cmd = vim.api.nvim_command
|
||||
vim.cmd = function(command)
|
||||
return vim.api.nvim_exec(command, false)
|
||||
end
|
||||
|
||||
-- These are the vim.env/v/g/o/bo/wo variable magic accessors.
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user