diff options
author | Aaron LI <aly@aaronly.me> | 2019-10-03 11:53:02 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-10-03 11:54:04 +0800 |
commit | d2a4672e74290fc8a0662fb459e8e268b72a0fdf (patch) | |
tree | eb8d5cd0ca786688184cf3e5be380702c4a2cb34 /_zsh/60-bindkeys.zsh | |
parent | b7c96f96473856ec0aaa2ffdd4454a2fca6c7735 (diff) | |
download | dotfiles-d2a4672e74290fc8a0662fb459e8e268b72a0fdf.tar.bz2 |
zsh: Merge zsh/* configs into zshrc
Meanwhile, drop some unused configurations ...
Diffstat (limited to '_zsh/60-bindkeys.zsh')
-rw-r--r-- | _zsh/60-bindkeys.zsh | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/_zsh/60-bindkeys.zsh b/_zsh/60-bindkeys.zsh deleted file mode 100644 index a57ab83..0000000 --- a/_zsh/60-bindkeys.zsh +++ /dev/null @@ -1,104 +0,0 @@ -# -# zsh/bindkeys.zsh -# see zshzle(1) -# -# To see the key combo you want to use just do: -# $ cat > /dev/null -# then press it. -# -# NOTE: -# Switching mode (e.g., `bindkey -v`) will *reset* the following settings! -# -# Credit: -# * oh-my-zsh: https://github.com/robbyrussell/oh-my-zsh -# lib/key-bindings.zsh -# - -# Make sure that the terminal is in application mode when zle is active, -# since only then values from $terminfo are valid -if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then - function zle-line-init() { - echoti smkx - } - function zle-line-finish() { - echoti rmkx - } - zle -N zle-line-init - zle -N zle-line-finish -fi - -# [Ctrl-r] - Search backward incrementally for a specified string. -# The string may begin with ^ to anchor the search to the beginning of the line. -bindkey '^r' history-incremental-search-backward - -# [PageUp] - Up a line of history -if [[ "${terminfo[kpp]}" != "" ]]; then - bindkey "${terminfo[kpp]}" up-line-or-history -fi -# [PageDown] - Down a line of history -if [[ "${terminfo[knp]}" != "" ]]; then - bindkey "${terminfo[knp]}" down-line-or-history -fi - -# start typing + [Up-Arrow] - fuzzy find history forward -if [[ "${terminfo[kcuu1]}" != "" ]]; then - autoload -U up-line-or-beginning-search - zle -N up-line-or-beginning-search - bindkey "${terminfo[kcuu1]}" up-line-or-beginning-search -fi -# start typing + [Down-Arrow] - fuzzy find history backward -if [[ "${terminfo[kcud1]}" != "" ]]; then - autoload -U down-line-or-beginning-search - zle -N down-line-or-beginning-search - bindkey "${terminfo[kcud1]}" down-line-or-beginning-search -fi - -# [Home] - Go to beginning of line -if [[ "${terminfo[khome]}" != "" ]]; then - bindkey "${terminfo[khome]}" beginning-of-line -fi -# [End] - Go to end of line -if [[ "${terminfo[kend]}" != "" ]]; then - bindkey "${terminfo[kend]}" end-of-line -fi - -# [Space] - do history expansion -bindkey ' ' magic-space -# [Ctrl-RightArrow] - move forward one word -bindkey '^[[1;5C' forward-word -# [Ctrl-LeftArrow] - move backward one word -bindkey '^[[1;5D' backward-word - -# [Shift-Tab] - move through the completion menu backwards -if [[ "${terminfo[kcbt]}" != "" ]]; then - bindkey "${terminfo[kcbt]}" reverse-menu-complete -fi - -# [Backspace] - delete backward -bindkey '^?' backward-delete-char -# [Delete] - delete forward -if [[ "${terminfo[kdch1]}" != "" ]]; then - bindkey "${terminfo[kdch1]}" delete-char -else - bindkey "^[[3~" delete-char - bindkey "^[3;5~" delete-char - bindkey "\e[3~" delete-char -fi - -# Emacs style line editing -bindkey "^K" kill-whole-line # ctrl-k -bindkey "^R" history-incremental-search-backward # ctrl-r -bindkey "^A" beginning-of-line # ctrl-a -bindkey "^E" end-of-line # ctrl-e -bindkey "[B" history-search-forward # down arrow -bindkey "[A" history-search-backward # up arrow -bindkey "^D" delete-char # ctrl-d -bindkey "^F" forward-char # ctrl-f -bindkey "^B" backward-char # ctrl-b - -# see zshcontrib(1) -autoload -U select-word-style -# bash-style word killing: word characters are alphanumeric characters only -select-word-style bash - -# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: # |