Reputation: 2161
I have a vim plugin (Startify) whose name/command overlaps with the name of a builtin vim command, :startinsert
, which I don't use. I would like to rename or in some way mask the builtin command (e.g. to :UNUSEDstartinsert
or something), so that I can begin typing ":Startify" and press tab to complete the name, rather than having to type the entire string to disambiguate it from :startinsert.
Ways I tried to rename :startinsert
:
:cabbrev
, :cnoreabbrev
- correctly adds an alias but doesn't delete original command:delcommand
(only operates on user commands)How do I rename a builtin?
Upvotes: 0
Views: 214
Reputation: 172540
There is no ambiguity between :startinsert
and :Startify
; built-in commands are lowercase and custom ones start with an uppercase letter.
I assume you have :set ignorecase
, and then Vim will offer both as completions for :start
. Instead of relying on completion for correcting the case, just type enough (properly cased) characters to make the command unique. Depending on your configuration, this could be as short as :S
, :St
, :Sta
, etc.
Upvotes: 1
Reputation: 45107
Sorry, there is no way to delete or rename a built in Vim command. Vim won't even let us create all lowercase commands. We have to resort to tricks like cabbrev
to create "aliases". The best advice is to come up with a different name or maybe a nicer alias.
Upvotes: 1