update
This commit is contained in:
1 parent
3d870a109a
commit
a4f4e93a68
1 file changed
+19
-9
@@ -1,4 +1,4 @@
|
|||||||
# Lines configured by zsh-newuser-install
|
unsetopt beep
|
||||||
HISTFILE=~/.zsh_history
|
HISTFILE=~/.zsh_history
|
||||||
SAVEHIST=500000
|
SAVEHIST=500000
|
||||||
HISTSIZE=$SAVEHIST+100000
|
HISTSIZE=$SAVEHIST+100000
|
||||||
@@ -10,23 +10,33 @@ setopt HIST_IGNORE_ALL_DUPS
|
|||||||
setopt HIST_IGNORE_SPACE
|
setopt HIST_IGNORE_SPACE
|
||||||
zshaddhistory() { whence ${${(z)1}[1]} >| /dev/null || return 1 }
|
zshaddhistory() { whence ${${(z)1}[1]} >| /dev/null || return 1 }
|
||||||
|
|
||||||
unsetopt beep
|
|
||||||
# To test keys:
|
# To test keys:
|
||||||
# cat > /dev/null
|
# cat > /dev/null
|
||||||
# sed -n l
|
# sed -n l
|
||||||
# List all commands:
|
# List all commands:
|
||||||
# zle -al
|
# zle -al
|
||||||
bindkey -e #emacs
|
_vi-kill-word(){
|
||||||
bindkey "^[[3~" delete-char #Delete
|
zle select-a-word
|
||||||
|
if ((REGION_ACTIVE)); then
|
||||||
|
zle kill-region
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
zle -N _vi-kill-word
|
||||||
|
bindkey -e #emacs style keybinding
|
||||||
bindkey "^[[H" beginning-of-line #Home
|
bindkey "^[[H" beginning-of-line #Home
|
||||||
bindkey "^[[F" end-of-line #End
|
bindkey "^[[F" end-of-line #End
|
||||||
bindkey "^[[5~" history-search-backward #PgUp
|
bindkey "^[[5~" history-search-backward #PgUp
|
||||||
bindkey "^[[6~" history-search-forward #PgDn
|
bindkey "^[[6~" history-search-forward #PgDn
|
||||||
bindkey "^[[1;5C" vi-forward-word #C-right
|
bindkey "^Z" undo #C-z
|
||||||
bindkey "^[[1;5D" vi-backward-word #C-left
|
bindkey "^[[3~" delete-char #Delete
|
||||||
bindkey "^H" vi-backward-kill-word #C-Backspace
|
bindkey "^[[1;3D" vi-backward-word #A-left
|
||||||
bindkey "^[[3;5~" delete-word #C-Delete
|
bindkey "^[[1;3C" vi-forward-word #A-right
|
||||||
# End of lines configured by zsh-newuser-install
|
bindkey '^[^?' vi-backward-kill-word #A-Backspace
|
||||||
|
bindkey "^[[3;3~" _vi-kill-word #A-Delete
|
||||||
|
bindkey "^[[1;5D" backward-word #C-left
|
||||||
|
bindkey "^[[1;5C" forward-word #C-right
|
||||||
|
bindkey "^H" backward-kill-word #C-Backspace
|
||||||
|
bindkey "^[[3;5~" kill-word #C-Delete
|
||||||
|
|
||||||
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
|
|||||||
Reference in new issue
Block a user