Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support alt/meta-backspace to delete word. #112

Closed
wants to merge 1 commit into from

Conversation

graham
Copy link

@graham graham commented Nov 19, 2018

alt-backspace is a common "delete word" in bash (and mac os x).

@c-bata
Copy link
Owner

c-bata commented Nov 19, 2018

Thanks. Your code changes are OK but I couldn't test this on my macbook pro. The reason why is iTerm2 and Terminal.app process Alt+Backspace as 0x7f (this is the same with Backspace).

alt-backspace

(When I type Alt+Backspace on Coteditor, it works fine. But iTerm2 and Terminal.app is not)

Tested on following versions of terminal emulators.

  • iTerm2 3.2.4
  • Terminal.app 2.9

Could you tell me the version of terminal emulators you use?

@graham
Copy link
Author

graham commented Nov 19, 2018

Interesting, perhaps it's an issue with my Tmux config. I'll test a bit more and make sure it works with iterm2 and terminal (with and without tmux).

@cmprmsd
Copy link

cmprmsd commented Apr 27, 2022

Hey @graham Just wondering why this was never merged and if there is a better way to detect the difference between backspace and alt+backspace.
Seems strange that this should be the same key code on Mac.

As you already said, it's quite common in most editors.

I'd like to use alt+backspace on Linux to delete full words.
For now I use ctrl+w as a workaround which seems to be emacs bindings as brianstrauch mentioned in the referenced issue in cobra-shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants