Skip to content

Better support for terminal editors (nvim, helix): avoid stdio: 'inherit', reuse running instances #161

Open

Description

@0froq

Clicking "open in editor" from Vite / Vue DevTools / Nuxt DevTools doesn't really work with terminal editors today:

  1. TUI editors are spawned with stdio: 'inherit', so they share the dev server's terminal (often busy or in another window) instead of getting their own.
  2. nvim and hx aren't recognized: no line/column args in get-args.js, and they're missing from isTerminalEditor, so each click spawns another instance.

LAUNCH_EDITOR (#39 / #49) is a good escape hatch, and I understand built-in TUI handling may be out of scope. I'd like to propose, and am happy to implement:

  • Small code change: add nvim (same args as vim) and hx (file:line:col) to the arg mappings, isTerminalEditor, and the editor lists.
  • A README section on terminal editors, documenting LAUNCH_EDITOR recipes in three layers:

Would you accept a PR for the mappings plus docs? If you'd rather keep any of this out of the core library, docs only works for me too.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions