Skip to content

Commit

Permalink
feat(symlinks): add key binding to edit line command in default editor
Browse files Browse the repository at this point in the history
  • Loading branch information
trystan2k committed Sep 15, 2024
1 parent 12e1b2a commit 27e4683
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions symlinks/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 27e4683

Please sign in to comment.