summaryrefslogtreecommitdiff
path: root/user-profiles/zsh/zshrc
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-01-03 22:37:27 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2021-01-03 22:37:27 +0100
commit5f21ebc0d3539276ccee967dd510e7aba8b31c0c (patch)
treebd29c23d4031f1161e704d1d7fc5aa901c38be12 /user-profiles/zsh/zshrc
parentd48742861083f37c670447ca98fb43490531be80 (diff)
downloadnixos-5f21ebc0d3539276ccee967dd510e7aba8b31c0c.tar
nixos-5f21ebc0d3539276ccee967dd510e7aba8b31c0c.tar.gz
nixos-5f21ebc0d3539276ccee967dd510e7aba8b31c0c.tar.bz2
nixos-5f21ebc0d3539276ccee967dd510e7aba8b31c0c.tar.xz
nixos-5f21ebc0d3539276ccee967dd510e7aba8b31c0c.zip
zsh customization
Diffstat (limited to 'user-profiles/zsh/zshrc')
-rw-r--r--user-profiles/zsh/zshrc26
1 files changed, 26 insertions, 0 deletions
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 @@
1fancy-ctrl-z () {
2 emulate -LR zsh
3 if [[ $#BUFFER -eq 0 ]]; then
4 [[ -n $(jobs -s) ]] && bg
5 zle redisplay
6 else
7 zle push-input
8 fi
9}
10zle -N fancy-ctrl-z
11bindkey '^Z' fancy-ctrl-z
12
13function fancy-ctrl-d() {
14 zle || exit 0
15 [[ -n $BUFFER ]] && return
16 typeset -g precmd_functions=(fancy-ctrl-d)
17 zle accept-line
18}
19zle -N fancy-ctrl-d
20bindkey '^D' fancy-ctrl-d
21setopt ignore_eof
22
23# word navigation for urxvt
24bindkey -e
25bindkey ';5C' emacs-forward-word
26bindkey ';5D' emacs-backward-word \ No newline at end of file