mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 15:34:40 +01:00
bind keys across terms
This commit is contained in:
parent
e3a45ff410
commit
28c12215c6
2 changed files with 45 additions and 15 deletions
42
inputrc
42
inputrc
|
|
@ -8,21 +8,33 @@
|
||||||
set completion-ignore-case on
|
set completion-ignore-case on
|
||||||
#set show-all-if-ambiguous
|
#set show-all-if-ambiguous
|
||||||
|
|
||||||
# Delete
|
"\e[1~": beginning-of-line
|
||||||
#"\e[3~": delete-char
|
"\e[4~": end-of-line
|
||||||
# Home
|
"\e[5~": beginning-of-history
|
||||||
#"\e[1~": beginning-of-line
|
"\e[6~": end-of-history
|
||||||
# End
|
"\e[2~": quoted-insert
|
||||||
#"\e[4~": end-of-line
|
"\e[3~": delete-char
|
||||||
|
"\e[5C": forward-word
|
||||||
|
"\eOC": forward-word
|
||||||
|
"\e[5D": backward-word
|
||||||
|
"\eOD": backward-word
|
||||||
|
"\e\e[C": forward-word
|
||||||
|
"\e\e[D": backward-word
|
||||||
|
# for rxvt
|
||||||
|
"\e[7~": beginning-of-line
|
||||||
|
"\e[8~": end-of-line
|
||||||
|
# for non RH/Debian xterm, can't hurt for RH/Debian xterm
|
||||||
|
"\eOH": beginning-of-line
|
||||||
|
"\eOF": end-of-line
|
||||||
|
# for freebsd console
|
||||||
|
"\e[H": beginning-of-line
|
||||||
|
"\e[F": end-of-line
|
||||||
|
|
||||||
# option+left/right
|
# Option+left/right on iTerm2
|
||||||
#"\e[1;3D":backward-word
|
"\e[[C":forward-word
|
||||||
#"\e[1;3C":forward-word
|
"\e[[D":backward-word
|
||||||
|
|
||||||
# control+left/right
|
# Control+left/right on iTerm2
|
||||||
#"\e[1;5D":beginning-of-line
|
"\e[1;5D": beginning-of-line
|
||||||
#"\e[1;5C":end-of-line
|
"\e[1;5C": end-of-line
|
||||||
|
|
||||||
# control+left/right
|
|
||||||
"\e[1;5D":backward-word
|
|
||||||
"\e[1;5C":forward-word
|
|
||||||
|
|
|
||||||
18
zshrc
18
zshrc
|
|
@ -7,6 +7,24 @@ prompt walters
|
||||||
# Use emacs keybindings even if our EDITOR is set to vi
|
# Use emacs keybindings even if our EDITOR is set to vi
|
||||||
bindkey -e
|
bindkey -e
|
||||||
|
|
||||||
|
# bind special keys according to readline configuration
|
||||||
|
eval "$(sed -n 's/^/bindkey /; s/: / /p' ~/.inputrc)"
|
||||||
|
|
||||||
|
# fix some keys
|
||||||
|
#bindkey "\e[1~" beginning-of-line # Home
|
||||||
|
#bindkey "\e[4~" end-of-line # End
|
||||||
|
#bindkey "\e[5~" beginning-of-history # PageUp
|
||||||
|
#bindkey "\e[6~" end-of-history # PageDown
|
||||||
|
#bindkey "\e[2~" quoted-insert # Ins
|
||||||
|
#bindkey "\e[3~" delete-char # Del
|
||||||
|
#bindkey "\e[5C" forward-word #
|
||||||
|
#bindkey "\eOc" emacs-forward-word # ^Right
|
||||||
|
#bindkey "\e[5D" backward-word #
|
||||||
|
#bindkey "\eOd" emacs-backward-word # ^Left
|
||||||
|
#bindkey "\e\e[C" forward-word #
|
||||||
|
#bindkey "\e\e[D" backward-word #
|
||||||
|
#bindkey "\e[Z" reverse-menu-complete # Shift+Tab
|
||||||
|
|
||||||
# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
|
# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
|
||||||
HISTSIZE=1000
|
HISTSIZE=1000
|
||||||
SAVEHIST=1000
|
SAVEHIST=1000
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue