Forked from emanueljacob/zsh_bash_keybindings_alt-arrow_mac.sh
Created
July 18, 2019 20:13
-
-
Save r37r0m0d3l/fdb099cc2ce44047c0350a522453b841 to your computer and use it in GitHub Desktop.
Alt + Arrow Key Bindings for JetBrains IntelliJ/PhpStorm on MacOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Currently the embedded terminal of Jetbrains IDEs does not make use of keybindings defined in terminal/iterm on mac | |
# Instead yo get the ring bell and output like [C or [D | |
# | |
# see: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000013224-Alt-key-not-working-in-embedded-terminal | |
# | |
# to fix it and allow ALT + Arrow in the the IDEs embedded terminal just do the following (depending on wich shell you use) | |
# If you use zsh | |
# Add this to ~/.zshrc : | |
bindkey "\e\eOD" backward-word | |
bindkey "\e\eOC" forward-word | |
# If you use bash | |
# Add this to ~/.inputrc | |
"\e\e[C": forward-word | |
"\e\e[D": backward-word | |
# -> don't forget to restart the terminal/IDE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment