fzy icon indicating copy to clipboard operation
fzy copied to clipboard

⌥⌫ to delete word

Open erusev opened this issue 6 years ago • 3 comments

It'd be great if ⌥⌫ deleted a word the same way it does basically anywhere on MacOS where you can edit text.

erusev avatar Jan 05 '19 21:01 erusev

C-w is usually delete word backwards in a lot of terminal programs so one option is to retrain your muscle memory

⌥⌫ might work on macOS either because of your terminal emulator sending through the right escape sequence or because of a patched readline library. Try checking in the options to see what escape sequence it is mapped to so that it might be added.

casr avatar Jan 07 '19 08:01 casr

I use the Natural Text Editing preset in iTerm2 - it sends a hex code - 0x1b 0x7f:

image

Note that ⌥⌫ does work as expected in fzf.

C-w is usually delete word backwards in a lot of terminal programs so one option is to retrain your muscle memory

Unfortunately, most text editors (including the text area I'm typing in right now) don't support C-w, which makes ⌥⌫ really hard to not use.

erusev avatar Jan 07 '19 09:01 erusev

I also use Alt-Backspace as I did in fzf :)

xeruf avatar Jul 26 '22 05:07 xeruf