Skip to content

Editor Open Error in Windows #413

Closed
Closed

Description

@Jimit-MTPL

I have grabbed the binary from here for windows: https://github.com/sst/opencode/releases

and also setup the Anthropic API key but /editor commands gives me this error: "no editor set can't open editor"

Is there any fix for this issue or currently it is not fully supported in windows ?

Activity

  1. cravenceiling commented on Jun 26, 2025

    @cravenceiling
    Contributor

    Have you set the EDITOR env variable?

  2. self-assigned this
    on Jun 26, 2025
  3. Jimit-MTPL commented on Jun 26, 2025

    @Jimit-MTPL
    Author

    No i have tried to find the steps to set this but didn't able to find any instruction. It would be great if you guide me to setup this in Windows.

  4. QDaed commented on Jun 26, 2025

    @QDaed

    i've the same question how to setup editor on windows

  5. cravenceiling commented on Jun 26, 2025

    @cravenceiling
    Contributor

    Well... I'm not a windows user but this is chatGPT's answer.

    ✅ Permanently (System/User Level)

    Option 1: Using System Settings GUI

    1. Press Win + S, search for “Environment Variables” and open “Edit the system environment variables.”

    2. In the System Properties window, click “Environment Variables…”

    3. Under User variables or System variables, click “New…”

    4. Set:

      • Variable name: EDITOR

      • Variable value: vscode (for example)

    5. Click OK → OK → OK to close all windows.

    6. Restart any open terminals or apps to load the new variable.

  6. sl5net commented on Jul 5, 2025

    @sl5net

    EDITOR Variable to vscode using Linux (Manjaro)

    • Variable name: EDITOR
    • Variable value: vscode (for example)
      To set the EDITOR environment variable in Linux (Manjaro) to use Visual Studio Code (VSCode), you need to:
      Find the Path to VSCode:
    • If you installed VSCode from the official Manjaro repository or via Snap/Flatpak, it is usually available as the command code.
    • You can check its path by running:
      bash
    which code
    

    Example output: /usr/bin/code

    • Set the EDITOR Variable Temporarily (for current terminal session):
      bash

    export EDITOR="code --wait"

    
    - The `--wait` flag is important, as it tells VSCode to wait until you close the file before returning control to the terminal.
    - **Set the EDITOR Variable Permanently:**
    
    - Open your shell profile in an editor (e.g. `.bashrc`, `.zshrc`, or `.profile` depending on your shell):
    
    bash
    

    kate ~/.bashrc

    or for zsh:
    

    kate ~/.zshrc

    Add the following line at the end:
    bash
    

    export EDITOR="code --wait"

    - Save and exit, then reload your profile:
    bash
    

    source ~/.bashrc

    or bash
    

    source ~/.zshrc

    **Summary:**
    - Find VSCode’s path: `which code`
    - Add `export EDITOR="code --wait"` to your shell profile
    - Reload your profile or restart the terminal
    Now, when you use commands that open the default editor (like `git commit` or `crontab -e`), VSCode will be used.
    echo $EDITOR
    code --wait
    
  7. rekram1-node commented on Oct 21, 2025

    @rekram1-node
    Collaborator

    closing since this is documented better now

  8. added a commit that references this issue on May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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