Skip to content

Support configured system editors#1301

Open
Jeccoman wants to merge 1 commit intopingdotgg:mainfrom
Jeccoman:feat/editor-env-support
Open

Support configured system editors#1301
Jeccoman wants to merge 1 commit intopingdotgg:mainfrom
Jeccoman:feat/editor-env-support

Conversation

@Jeccoman
Copy link

@Jeccoman Jeccoman commented Mar 22, 2026

What Changed

This updates the open-in-editor flow to respect VISUAL and EDITOR when resolving available editors and launching files. If the configured command matches a known editor, the existing editor option is reused. If it points to another runnable editor, a System Editor option is shown instead. The change also adds tests covering configured known editors and unknown configured commands.

Why

Users with a preferred editor configured through VISUAL or EDITOR could still be blocked by the current hardcoded editor detection flow. This keeps the existing behavior for known editors while allowing configured system editors to work without requiring a dedicated built-in entry first.

Checklist

  • [1 ] This PR is small and focused
  • [1 ] I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Add system editor support via VISUAL/EDITOR environment variables

  • Reads VISUAL and EDITOR env vars to detect a user-configured system editor, tokenizing the command with basic quote handling and matching it against known built-in editor IDs.
  • Adds 'system-editor' as a recognized editor ID in the contracts and surfaces it as a "System Editor" option in the editor picker when available.
  • resolveAvailableEditors now includes the configured editor even when its default binary is not on PATH, and lists 'system-editor' for unknown-but-available commands.
  • resolveEditorLaunch uses the configured command and args when launching 'system-editor', applies --goto for file:line:col targets, and returns an explicit error if 'system-editor' is requested but no env var is configured.
  • Behavioral Change: known editors (e.g. VS Code) can now launch via the configured VISUAL/EDITOR path instead of their default binary when the default is absent from PATH.

Macroscope summarized f9c2f48.

@coderabbitai
Copy link

coderabbitai bot commented Mar 22, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a8b45c7a-f9fd-4ba5-b5b1-ab197c5eaa6d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

Migrating from UI to YAML configuration.

Use the @coderabbitai configuration command in a PR comment to get a dump of all your UI settings in YAML format. You can then edit this YAML file and upload it to the root of your repository to configure CodeRabbit programmatically.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant