intellij-ideaterminalwebstormkey-bindingsfish

fish shell + WebStorm terminal: how to use Alt + backspace to delete entire word


I am trying out WebStorm and I use fish as my default shell. I am using macOS.

In VSCode's integrated terminal, iTerm2, and terminal my fish shell works as I want it: it deletes an entire word with Alt + backspace.

When I am in WebStorm's integrated terminal this does not work. I have not been able to find any solution to this problem.

How can I get Alt + backspace to delete an entire word (kill-word) in WebStorm's integrated terminal?

I have tried changing the key bindings for fish shell.

In iTerm2:

  1. fish_key_reader & pressing Alt backspace
Press a key:
bind \e\x7F 'do something'
  1. bind \e\x7F backward-kill-word

Solution

  • Running the same commands in WebStorm's integrated terminal solved my problem.

    In WebStorm's integrated terminal: (put this in ~/.config/fish/config.fish to keep the setting after restart and do not only run the command in a terminal!)

    1. fish_key_reader & pressing Alt backspace
    Press a key:
    bind \e\x7F 'do something'
    
    1. bind \e\x7F backward-kill-word