Problem
This plugin has multiple user commands using camelCase (:TermExec, :TermNew, :TermSelect, :ToggleTermToggleAll, :ToggleTermSend*, :ToggleTermSetName, etc.). However, I've been reading Neovim plugin conventions and a point they bring up is that this design pollutes the command namespace and makes completion noisy. A better design would be :{PLUGIN}<Space>{subcommand} ex: :ToggleTerm select
Proposal
Adopt a single scoped command with subcommands, with completion support.
Example:
:ToggleTerm (default toggle)
:ToggleTerm toggle
:ToggleTerm exec …
:ToggleTerm new …
:ToggleTerm select
:ToggleTerm toggle_all
:ToggleTerm send current_line|visual_lines|visual_selection
:ToggleTerm set_name …
Provide subcommand-aware completion.
Add legacy_commands = true (default false) to optionally register the old command names for users who rely on them.
Why
Better completion UX.
Acceptance Criteria
- Single
:ToggleTerm command works with subcommands listed above
- Completion suggests subcommands and delegates to existing argument completion for
exec, new, toggle
legacy_commands opt‑in registers old command names
Pull request
Would a pull request be welcomed? Along with the refactoring of the command names, I would update the README.md and doc/toggleterm.txt. Also, I would update the tests.
Problem
This plugin has multiple user commands using camelCase (
:TermExec,:TermNew,:TermSelect,:ToggleTermToggleAll,:ToggleTermSend*,:ToggleTermSetName, etc.). However, I've been reading Neovim plugin conventions and a point they bring up is that this design pollutes the command namespace and makes completion noisy. A better design would be:{PLUGIN}<Space>{subcommand}ex::ToggleTerm selectProposal
Adopt a single scoped command with subcommands, with completion support.
Example:
:ToggleTerm(default toggle):ToggleTerm toggle:ToggleTerm exec …:ToggleTerm new …:ToggleTerm select:ToggleTerm toggle_all:ToggleTerm send current_line|visual_lines|visual_selection:ToggleTerm set_name …Provide subcommand-aware completion.
Add
legacy_commands = true(default false) to optionally register the old command names for users who rely on them.Why
Better completion UX.
Acceptance Criteria
:ToggleTermcommand works with subcommands listed aboveexec,new,togglelegacy_commandsopt‑in registers old command namesPull request
Would a pull request be welcomed? Along with the refactoring of the command names, I would update the README.md and doc/toggleterm.txt. Also, I would update the tests.