Skip to content

option delete doesn't delete word by word #4965

Closed

Description

@luisrudge

Description

it was working until last week

OpenCode version

1.0.126

Steps to reproduce

type a few words in macos. press option + delete to delete a word, it only deletes a character.

Screenshot and/or share link

No response

Operating System

mac

Terminal

ghostty

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 2, 2025
  2. github-actions commented on Dec 2, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. luisrudge commented on Dec 2, 2025

    @luisrudge
    Author

    interesting.. it works in vscode's (cursor's) terminal. but it doesn't work in ghostty or macos terminal

  4. kommander commented on Dec 15, 2025

    @kommander
    Collaborator

    macos terminal before Tahoe does not support modifyOtherKeys, so it won't work there, but behaviour should be better in the latest version and option+delete and option+backspace are now mapped to by-word actions by default.

  5. luisrudge commented on Dec 16, 2025

    @luisrudge
    Author

    @kommander do you mean in opencode or on opentui (meaning we need to wait for an update in OC with the new opentui version)? Asking it because it's still not fixed in 1.0.161

  6. kommander commented on Dec 16, 2025

    @kommander
    Collaborator

    Where doesn't it work?

  7. luisrudge commented on Dec 16, 2025

    @luisrudge
    Author

    opencode terminal text area

  8. supnim commented on Dec 16, 2025

    @supnim

    just to note: option + backspace works in claude code via ghostty

  9. kommander commented on Dec 16, 2025

    @kommander
    Collaborator

    @luisrudge @supnim what is in your opencode configs? Custom or default?

  10. supnim commented on Dec 16, 2025

    @supnim

    default boss

  11. kommander commented on Dec 16, 2025

    @kommander
    Collaborator

    I cannot reproduce this, option+backspace deletes the word before the cursor and option+delete deletes the word after the cursor as expected. Did something mess with the Ghostty config?

  12. luisrudge commented on Dec 16, 2025

    @luisrudge
    Author

    default opencode config

    ghostty config:

    keybind = shift+enter=text:\n
    confirm-close-surface=false
    working-directory = ~/Developer/
    
  13. luisrudge commented on Dec 17, 2025

    @luisrudge
    Author

    interesting that I can navigate with option + arrow left/right and it navigates correctly. it's only an issue if I'm deleting text

  14. supnim commented on Dec 17, 2025

    @supnim

    ghostty config:

    theme = dark:"Material Darker",light:"Violet Light"
    window-inherit-working-directory = true
    fullscreen = true
    working-directory = /Users/nimesh/Code/aiagent
    unfocused-split-opacity = 1
    keybind = shift+enter=text:\n
    
    

    Okay, I messed around a bit more, and found thatctrl + backspacedoes the behaviour of what i except option + backspace to do.

    ps. im on a mac

  15. aryaMode commented on Dec 21, 2025

    @aryaMode

    Setting up my ghostty config up like this worked for me:

    macos-option-as-alt = true
    keybind = alt+backspace=text:\x1b\x7f
    keybind = alt+delete=esc:d

  16. luisrudge commented on Dec 22, 2025

    @luisrudge
    Author
    macos-option-as-alt = true
    

    this works. really unfortunate that opencode doesn't work with the default options, though.

  17. supnim commented on Dec 27, 2025

    @supnim

    Setting up my ghostty config up like this worked for me:

    macos-option-as-alt = true keybind = alt+backspace=text:\x1b\x7f keybind = alt+delete=esc:d

    this worked for me! thank you

  18. valtism commented on Dec 27, 2025

    @valtism

    @kommander I think this is still an issue and should be reopened. It does not work by default for me with MacOS and Ghostty

  19. rekram1-node commented on Dec 27, 2025

    @rekram1-node
    Collaborator

    What version of ghostty are you on, im on macos and default ghostty (v1.2.3) cannot replicate issue

  20. valtism commented on Dec 27, 2025

    @valtism

    MacOS 26.1 and Ghostty tip (commit 669733d59 build 13319) tested with default config

    opt + backspace just does a single backspace. cmd + backspace works (deletes entire line)

  21. jakst commented on Dec 28, 2025

    @jakst

    I have the issue with MacOS v26.1, OpenCode v1.0.206, and Ghostty v1.2.3.

    ctrl+backspace and ctrl+w works to delete word backwards, and opt+delete (i.e. fn+opt+backspace) works to delete word forward. But opt+backpsace does not delete word backwards.

  22. andrempeixoto commented on Feb 18, 2026

    @andrempeixoto

    This worked for me, in Ghostty config:

    # Treats Option as Alt, enabling standard word-jump/delete shortcuts
    macos-option-as-alt = true
    
  23. vaspoz commented on Mar 3, 2026

    @vaspoz

    in warp it doesn't work as well, no one mentioned combination

  24. kommander commented on Mar 3, 2026

    @kommander
    Collaborator

    That is a MacOS system level issue, for most terminals you either have to set "use option as meta key" in system settings or in the terminal config.

  25. vaspoz commented on Mar 3, 2026

    @vaspoz

    That is a MacOS system level issue, for most terminals you either have to set "use option as meta key" in system settings or in the terminal config.

    No, it’s not
    Same terminal, same OS, Claude Code - works, OpenCode - doesn’t

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions