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.

4 Answers 4

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

Sign up to request clarification or add additional context in comments.

3 Comments

Not a complete solution, but since these are the two most used meta-key... works for me.
"∂": 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 definitely worth adding.
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

Comments

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).

5 Comments

I'm on a Mac. Both Terminal & iTerm have an option to map the ALT key to ESC+.
So If I'm understanding, the meta key works on both Terminal and & iTerm but when embedded in the IntelliJ the key is not responding?
Yes, I believe Terminal & iTerm have settings that enable this functionality, but Jetbrains embedded terminal does not. It may simply not be possible. I was hoping it was.
just checking to see if this is still an issue
It is, bothers me too.
0

To enable or disable this setting:

  • Open IntelliJ IDEA's Settings/Preferences.

  • Navigate to Tools | Terminal.

  • Locate the checkbox labeled "Use Option as Meta key" and adjust it according to your preference.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.