mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
add custom config
This commit is contained in:
parent
e2e7f646ae
commit
1dbdb3779f
3 changed files with 168 additions and 3 deletions
26
custom/fix-keybindings.zsh
Normal file
26
custom/fix-keybindings.zsh
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
# bash like history search
|
||||
# PGUP, PGDN, HOME, END
|
||||
bindtc ()
|
||||
{
|
||||
setopt localoptions
|
||||
local keyval=$(echotc "$1" 2>&-)
|
||||
[[ $keyval == "no" ]] && keyval=""
|
||||
bindkey "${keyval:-$2}" "$3"
|
||||
}
|
||||
|
||||
# Bindings for PGUP, PGDN, HOME, END
|
||||
bindtc kP "^[[I" history-beginning-search-backward
|
||||
bindtc kN "^[[G" history-beginning-search-forward
|
||||
bindtc kh "^[[7~" beginning-of-line
|
||||
bindtc kH "^[[8~" end-of-line
|
||||
|
||||
# Bindings for UP, DOWN, LEFT, RIGHT
|
||||
bindtc ku "^[[A" up-line-or-history
|
||||
bindtc kd "^[[B" down-line-or-history
|
||||
bindtc kr "^[[C" forward-char
|
||||
bindtc kl "^[[D" backward-char
|
||||
|
||||
# make del behave
|
||||
bindkey "^[[3~" delete-char
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue