Skip to main content
Version: Next

remove

function remove(name): CommandDefinition;

Remove an ex command by name.

warning

The builtin command js cannot be removed.

Parameters

ParameterTypeDescription

name

string

The command name to be removed.

Returns

CommandDefinition

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);
});