Skip to content

[Feature]: Support custom code editors via VISUAL/EDITOR environment variables #1068

Closed as duplicate

Description

@0pilatos0

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I am describing a concrete problem or use case, not just a vague idea.

Area

apps/desktop

Problem or use case

The list of supported editors is hardcoded. When users need a different editor (e.g., WebStorm, #428), it requires a code change. As adoption grows, individual editor requests won't scale.

Proposed solution

Read the VISUAL / EDITOR environment variable and offer it as an additional option in the editor picker — not as a replacement for the current default. The built-in list and its default (Cursor) stay as-is. If the env var points to a known editor, reuse its icon/config. If unknown, show it as a generic "System Editor" option that launches with the directory path as the argument.

Why this matters

Users of less common editors can use t3code without waiting for their editor to be explicitly added. Contributors don't need to maintain an ever-growing editor list.

Smallest useful scope

Read VISUAL (falling back to EDITOR), check if the command is on PATH, and surface it as one extra option in the picker. No settings UI needed.

Alternatives considered

Adding editors one by one to the hardcoded list (current approach, see #428). A dedicated settings UI for custom editors — viable but heavier for what environment variables already solve.

Risks or tradeoffs

Some editors may not follow the convention of accepting a directory path as an argument. The generic fallback can't support editor-specific flags like --goto.

Examples or references

Image

Contribution

  • I would be open to helping implement this.

Activity

  1. added
    enhancementRequested improvement or new capability.
    needs-triageIssue needs maintainer review and initial categorization.
    on Mar 14, 2026
  2. 0pilatos0 commented on Mar 20, 2026

    @0pilatos0
    Author

    okey... this is getting out of hand, how the hell is everyone creating random pr's for this without triage....

  3. Sah-Nikhil commented on Mar 22, 2026

    @Sah-Nikhil

    Hi, I've implemented a possible approach in my fork with a Custom Editor executable path flow.

    It keeps the built-in editor list/defaults unchanged, but adds a “Custom Editor” option that launches any editor from a user-specified path (e.g. WebStorm, custom installs).
    This works in both desktop (screenshot is from Windows) and server/web launch paths and doesn’t require adding new hardcoded editor IDs.

    This could complement VISUAL / EDITOR by providing an explicit, user-configurable fallback when env vars aren’t set or don’t match the desired editor.
    env vars could act as initial defaults, with explicit settings providing a more deterministic override and making debugging easier when launch args differ.
    (currently, my implementation only covers the custom executable path method)

    Happy to open a PR to upstream this, if this direction makes sense. Or combine both approaches (env vars as initial autofill + settings override).

    Screenshots below:

    Settings

    Image

    Desktop (Windows)

    Image

    Web

    Image

    edit: fixing typos

  4. lmerz1 commented on May 11, 2026

    @lmerz1

    For what it's worth, I'd also very much like to have this feature, but the original suggestion misses that "opening $EDITOR" is a twofold requirement: Determining the actual editor via environment variable is the easier part, but for terminal-based editors, a GUI application also has to detect (or query the user for) their preferred terminal emulator application if the calling app doesn't want to open the (typically full-sized) terminal itself.

    For example, on macOS most people are not using Terminal.app, but probably Ghostty/Kitty/iTerm2/…, so T3 Code would probably have to either

    1. enumerate possible terminal emulator apps, and their paths (or commands to open them), on multiple OS's (painful)
    2. let the user provide a path for the terminal application for it to then take over and spawn a new window/tab plus open $EDITOR with e.g. the /path/to/file:line:column format.
  5. juliusmarminge commented on Jun 9, 2026

    @juliusmarminge
    Member

    Duplicate of #433

    Same capability — register a custom editor for the Open button instead of the hardcoded list; #433 is canonical and also covers editing/removing entries. The VISUAL/EDITOR env-var detection is a good implementation candidate for it.

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

    enhancementRequested improvement or new capability.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions