diff --git a/config/zsh/line-editor.zsh b/config/zsh/line-editor.zsh index c3c2e75..5c7e363 100644 --- a/config/zsh/line-editor.zsh +++ b/config/zsh/line-editor.zsh @@ -39,6 +39,7 @@ bindkey -M viins '^a' vi-beginning-of-line bindkey -M viins '^e' vi-end-of-line bindkey -M viins '^l' clear-screen bindkey -M viins '^u' kill-whole-line +bindkey -M viins '^y' yank bindkey -M viins '^[.' insert-last-word # Search through history in insert mode. @@ -49,6 +50,18 @@ bindkey -M viins '^k' history-beginning-search-backward bindkey -M viins '^[b' vi-backward-word bindkey -M viins '^[f' vi-forward-word +# Edit current command line in $EDITOR. +autoload edit-command-line && zle -N edit-command-line +bindkey -M viins '^x^e' edit-command-line +bindkey -M vicmd ' ' edit-command-line + +clear-status-line() { + zle -R -c + # zle -R hello world and the rest +} +zle -N clear-status-line +bindkey -M viins '^q' clear-status-line + # Shortcut to start neovim. bindkey -s '^v' '^unvim\r'