20

I'm currently working in WebStorm, but also use IDEA and RubyMine. I am using the embedded terminal and would like to get the Alt/Option key to be recognized as a the meta key, or at least send key+ESC.

zen
  • 571
  • 5
  • 13

3 Answers3

5

For macOS users, put these in ~/.inputrc for Bash:

"ƒ": forward-word "∫": backward-word "≥": yank-last-arg "∂": kill-word

And other simple meta key bindings can be defined here. (Unless you use ƒ and ∫ more often.) Note this only works in local shells, not in remote SSH shells.

Ref: https://youtrack.jetbrains.com/issue/IDEA-165184#focus=streamItem-27-1955537-0-0

Fish Monitor
  • 4,155
  • 3
  • 32
  • 53
  • Not a complete solution, but since these are the two most used meta-key... works for me. – zen Aug 16 '18 at 15:46
  • 1
    `"∂": kill-word` is useful too (`ALT+D` to delete next word). `man bash` to see more commands (search for `(M-` which means `Esc+` and see what shortcuts you want to rebind in `.inputrc`) – Kevin Nov 30 '18 at 04:05
  • @Kevin definitely worth adding. – Fish Monitor Dec 01 '18 at 03:30
1

Now that I have moved to zsh and have more experience with this issue. Here is what I have in my .zshrc file:

### Jetbrains terminal
if [[ "$TERMINAL_EMULATOR" == "JetBrains-JediTerm" ]]; then
  bindkey -s "µ" "^E | less ^M" # Personal Alt-M shortcut
  bindkey "ƒ" forward-word
  bindkey "∫" backward-word
  bindkey "∂" kill-word
  bindkey "¬" downcase-word
  bindkey "ç" capitalize-word
  bindkey "†" transpose-words
  bindkey "≥" insert-last-word
  # bindkey "¨ " upcase-word
fi

Check out zsh list of standard Widgets

zen
  • 571
  • 5
  • 13
0

All related to the terminal configuration is here: IntelliJ Embedded Terminal

It looks like IntelliJ is just an interface and calls the system's terminal (or whatever you configure in the Shell Path option). So it's not up to IntelliJ but to the shell you are calling to be configured correctly.

So check what shell is IntelliJ calling, and then check if the key is working there (without calling it through IntelliJ).