From 5f21ebc0d3539276ccee967dd510e7aba8b31c0c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 3 Jan 2021 22:37:27 +0100 Subject: zsh customization --- user-profiles/zsh/zshrc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 user-profiles/zsh/zshrc (limited to 'user-profiles/zsh/zshrc') diff --git a/user-profiles/zsh/zshrc b/user-profiles/zsh/zshrc new file mode 100644 index 00000000..3660ef27 --- /dev/null +++ b/user-profiles/zsh/zshrc @@ -0,0 +1,26 @@ +fancy-ctrl-z () { + emulate -LR zsh + if [[ $#BUFFER -eq 0 ]]; then + [[ -n $(jobs -s) ]] && bg + zle redisplay + else + zle push-input + fi +} +zle -N fancy-ctrl-z +bindkey '^Z' fancy-ctrl-z + +function fancy-ctrl-d() { + zle || exit 0 + [[ -n $BUFFER ]] && return + typeset -g precmd_functions=(fancy-ctrl-d) + zle accept-line +} +zle -N fancy-ctrl-d +bindkey '^D' fancy-ctrl-d +setopt ignore_eof + +# word navigation for urxvt +bindkey -e +bindkey ';5C' emacs-forward-word +bindkey ';5D' emacs-backward-word \ No newline at end of file -- cgit v1.2.3