remove
function remove(name): CommandDefinition;
Remove an ex command by name.
warning
The builtin command js cannot be removed.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The command name to be removed. |
Returns
Returns the removed RsvimCmd.CommandDefinition, or undefined if no command is been removed.
Throws
Throws TypeError if name is not a string.
Example
Rsvim.cmd.list().forEach((cmd) => {
// Remove all registered commands.
Rsvim.cmd.remove(cmd.name);
});