If a vim plugin and a vim builtin command share very similar names, is it possible to rename the builtin to something unambiguously different, or otherwise remove the builtin command from vim's completion list? (offending command: :startinsert)

To be clear:

  1. I don't just want a new name; I need to remove the old command name from the completion list (it's fine if the command still exists, just under a new name)
  2. I realize that I can just alias the plugin to something new, but I don't want the builtin to take precedence, I want the plugin's command to unambiguously take precedence in completion. The builtin command name should not appear in the completion list for the same prefix.

To prevent issues with plugins expecting a builtin and getting a user-defined command, user-defined commands must always start with an uppercase letter. Likewise, builtin commands cannot be renamed, for the same reasons.

Because of the above, to my knowledge nobody has seriously considered allowing a builtin command to be removed or "deprioritized" in completion, so it's also not possible without writing an elaborate plugin that "trapped" the completion character on the :-command line and emulated completion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.