summaryrefslogtreecommitdiffstats
path: root/zsh/.zshinput
blob: ada9a5e098b02ac49a88f497ded97ecf88cdf685 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
bindkey -v

source ~/.config/sh/fzf/shell/key-bindings.zsh

autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^[[A" history-beginning-search-backward-end
bindkey "^[[B" history-beginning-search-forward-end
bindkey "^[OA" history-beginning-search-backward-end
bindkey "^[OB" history-beginning-search-forward-end

bindkey -M viins '^R' fzf-history-widget
bindkey -M vicmd '^R' fzf-history-widget

bindkey -M vicmd ')' vi-digit-or-beginning-of-line
bindkey -M vicmd 'e' vi-change
bindkey -M vicmd 'E' vi-change-eol
bindkey -M vicmd '_' vi-first-non-blank
bindkey -M vicmd '|' send-break

bindkey "^?" backward-delete-char
bindkey "^H" backward-delete-char
bindkey -M viins "^[[3~" delete-char
bindkey -M vicmd "^[[3~" delete-char

page-up-within-tmux() {
  if [[ $TMUX == '' ]]; then
    :
  else
    tmux copy-mode -u
  fi
}
zle -N page-up-within-tmux

# page up
bindkey "${terminfo[kpp]}" page-up-within-tmux