I would like to bind fn+→ and fn+← to "End" and "Home" in the IntelliJ terminal on my Mac (this is the very same combination that iTerm uses).
If this is not possible, I could also live with ⌘+→ and ⌘+←.
I know that ctrl+e and ctrl+a can be used for jumping to the start and end of a line but for convenience I'd like to use the same combinations as within iTerm.
Edit
Interestingly, my keymap shows ↖ and ↘ as keybord shortcut for Move Caret to Line End
and Move Caret to Line Start
- it works in the editor - but it does not work in the terminal:
Edit 2
I found out that the problem occurs only with zsh
- when I use bash
, fn+→ and fn+← work as expected. Any ideas where IntelliJ and zsh
might conflict here? It works with the very same zsh
configuration in iTerm.
After searching for a while, I stumbled over this post
https://youtrack.jetbrains.com/issue/IDEA-118848
that covers the issue, a fix was proposed here
https://github.com/robbyrussell/oh-my-zsh/issues/4784#issuecomment-180940049
Following this fix, I added
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
to my .zshrc
and now everything works like a charm.
Default OS X bindings have fn+→ and fn+← to "End" and "Home" respectively.
If that is not the case for you, please update from keymap in settings panel.
Titled arrow shown in keymap binding means fn+→ or fn+← (based on direction of the arrow).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With