diff options
Diffstat (limited to 'user-profiles/zsh/zshrc')
-rw-r--r-- | user-profiles/zsh/zshrc | 26 |
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 @@ | |||
1 | fancy-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 | } | ||
10 | zle -N fancy-ctrl-z | ||
11 | bindkey '^Z' fancy-ctrl-z | ||
12 | |||
13 | function fancy-ctrl-d() { | ||
14 | zle || exit 0 | ||
15 | [[ -n $BUFFER ]] && return | ||
16 | typeset -g precmd_functions=(fancy-ctrl-d) | ||
17 | zle accept-line | ||
18 | } | ||
19 | zle -N fancy-ctrl-d | ||
20 | bindkey '^D' fancy-ctrl-d | ||
21 | setopt ignore_eof | ||
22 | |||
23 | # word navigation for urxvt | ||
24 | bindkey -e | ||
25 | bindkey ';5C' emacs-forward-word | ||
26 | bindkey ';5D' emacs-backward-word \ No newline at end of file | ||