From 27e46837924e2d09fae17d76fa690b0df3be79b2 Mon Sep 17 00:00:00 2001 From: Thiago Mendonca Date: Sun, 15 Sep 2024 23:12:40 +0200 Subject: [PATCH] feat(symlinks): add key binding to edit line command in default editor --- symlinks/.zshrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/symlinks/.zshrc b/symlinks/.zshrc index eed4e46..3041ec2 100644 --- a/symlinks/.zshrc +++ b/symlinks/.zshrc @@ -143,8 +143,6 @@ eval "$(mcfly init zsh)" source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc" # Handle nppmrc config according to ENV variable -autoload -U add-zsh-hook - set-npmrc-config-hook() { if ! type npmrc > /dev/null; then @@ -158,8 +156,14 @@ set-npmrc-config-hook() { fi } +autoload -U add-zsh-hook add-zsh-hook chpwd set-npmrc-config-hook +# Edit the current command line in $EDITOR +autoload -U edit-command-line +zle -N edit-command-line +bindkey '\C-x\C-e' edit-command-line + if [ -z "$ZELLIJ" ] && [ "$TERM" = "xterm-kitty" ]; then zellij -l welcome fi