mirror of
https://codeberg.org/hyperreal/dotfiles
synced 2024-11-25 11:53:43 +01:00
43 lines
1.2 KiB
Bash
43 lines
1.2 KiB
Bash
|
#!/usr/bin/env zsh
|
||
|
##############################################################################
|
||
|
# vim:set ft=zsh ai et sw=4 ts=4:
|
||
|
#
|
||
|
# @author : Jeffrey Serio <hyperreal@unixcat.coffee>
|
||
|
# @file : input.zsh
|
||
|
# @load_order : post-zshrc
|
||
|
|
||
|
$include /etc/inputrc
|
||
|
bindkey -v
|
||
|
|
||
|
typeset -g -A key
|
||
|
key[Home]="${terminfo[khome]}"
|
||
|
key[End]="${terminfo[kend]}"
|
||
|
|
||
|
[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line
|
||
|
[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line
|
||
|
|
||
|
## check if fzf keybindings file exists
|
||
|
if test -f /home/jas/.fzf/shell/key-bindings.zsh; then
|
||
|
source /home/jas/.fzf/shell/key-bindings.zsh
|
||
|
|
||
|
bindkey -M viins "^H" fzf-history-widget
|
||
|
bindkey -M vicmd "^H" fzf-history-widget
|
||
|
bindkey -M vicmd "/" history-incremental-search-backward
|
||
|
bindkey -M vicmd "?" history-incremental-search-forward
|
||
|
|
||
|
page-up-within-tmux() {
|
||
|
if (( ${+TMUX} )); then
|
||
|
tmux copy-mode -u
|
||
|
fi
|
||
|
}
|
||
|
zle -N page-up-within-tmux
|
||
|
|
||
|
# page up
|
||
|
bindkey "${terminfo[kpp]}" page-up-within-tmux
|
||
|
fi
|
||
|
|
||
|
## history substring search
|
||
|
bindkey '^[[1;5A' history-substring-search-up
|
||
|
bindkey '^[[1;5B' history-substring-search-down
|
||
|
|