Browse Source

Add zsh keybinds

master
Riyyi 4 years ago
parent
commit
cf4444a125
  1. 23
      .config/zsh/.zshrc

23
.config/zsh/.zshrc

@ -50,14 +50,16 @@ zstyle ':completion:*' menu select
zle -N history-beginning-search-backward-end history-search-end zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end zle -N history-beginning-search-forward-end history-search-end
bindkey '\eOd' backward-word bindkey '\eOc' forward-word # ctrl-right
bindkey '\eOc' forward-word bindkey '\eOd' backward-word # ctrl-left
bindkey '\e[7~' beginning-of-line bindkey '\e[3~' delete-char # del
bindkey '\e[3~' delete-char bindkey '\e[7~' beginning-of-line # home
bindkey '\e[8~' end-of-line bindkey '\e[8~' end-of-line # end
bindkey '\e[A' history-beginning-search-backward-end bindkey '\e[A' history-beginning-search-backward-end # up
bindkey '\e[B' history-beginning-search-forward-end bindkey '\e[B' history-beginning-search-forward-end # down
bindkey '^R' history-incremental-pattern-search-backward bindkey '\ej' history-beginning-search-forward-end # meta-j
bindkey '\ek' history-beginning-search-backward-end # meta-k
bindkey '^R' history-incremental-pattern-search-backward # ctrl-r
# History # History
setopt APPEND_HISTORY setopt APPEND_HISTORY
@ -77,16 +79,19 @@ SAVEHIST=10000
alias ..="cd .." alias ..="cd .."
alias ...="cd ../.." alias ...="cd ../.."
alias ....="cd ../../.." alias ....="cd ../../.."
alias cp='cp -i'
alias df="df -h" alias df="df -h"
alias e="$HOME/.scripts/alias.sh emacs" alias e="$HOME/.scripts/alias.sh emacs"
alias emacs="$HOME/.scripts/alias.sh emacs" alias emacs="$HOME/.scripts/alias.sh emacs"
alias fuck='sudo $(fc -ln -1)' alias fuck='sudo $(fc -ln -1)'
alias grep="grep --color=always" alias grep="grep --color=always"
alias la="ls -lAGh --color --group-directories-first" alias l.="\ls -lAGh --color --group-directories-first | awk -v r='^(.*m)?\\\.' '{ if (\$8 ~ r) print; }'"
alias la="\ls -lAGh --color --group-directories-first"
alias less="less -x 4" alias less="less -x 4"
alias ls="ls --color --group-directories-first" alias ls="ls --color --group-directories-first"
alias md="mkdir -p" alias md="mkdir -p"
alias mkcd="$HOME/.scripts/alias.sh mkcd" alias mkcd="$HOME/.scripts/alias.sh mkcd"
alias mv='mv -i'
alias pkill="pkill -9" alias pkill="pkill -9"
alias q="exit" alias q="exit"
alias rm="rm -i" alias rm="rm -i"

Loading…
Cancel
Save