0

I'm trying to use zsh in the CLion terminal window (changed my shell to /bin/zsh)

But when I try to move around using Ctrl + Left, Ctrl + Right, Ctrl + E... I get the literal characters D, C and Ctrl + E opens the "Recent files" UI

Is there any way around this? I'd like to use the movement keystrokes as I can with bash.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Tempoz
  • 21
  • 3

1 Answers1

0

Tempoz,

Check out the offical Zsh Line Editor doc and the Z-Shell Line Editor guide for tons of detail.

To start, you can see your current mappings by typing bindkey at your prompt. There are two start modes: emacs [default], and vi. If you want to use vi mode, add this to your ~/.zshrc

bindkey -v

and source it (or restart your shell, or restart your IDE). Check out how the bindkey output has changed.

If you decide you want to change or augment your key mappings, use bind in your ~/.zshrc to reassign, or add to your key map.

# Example key binding change
# bindkey key-sequence editor-command
bindkey '^Z' vi-kill-line

You will also probably want to fix your $PATH - all the JetBrains products do it incorrectly. See this answer: https://stackoverflow.com/a/51006003/1089228

Steve Tarver
  • 3,030
  • 2
  • 25
  • 33