Restore some nice keybindings from my previous repo
This commit is contained in:
parent
b825210c29
commit
2a042c031b
1 changed files with 23 additions and 4 deletions
|
@ -1,12 +1,31 @@
|
||||||
#! zsh
|
#! zsh
|
||||||
|
autoload -Uz select-word-style
|
||||||
|
select-word-style shell
|
||||||
|
|
||||||
|
# Allow S-Tab to backtrack through the completion menu.
|
||||||
bindkey $terminfo[kcbt] reverse-menu-complete
|
bindkey $terminfo[kcbt] reverse-menu-complete
|
||||||
|
|
||||||
|
# Tweaks to vi mode:
|
||||||
|
bindkey '^?' backward-delete-char # backspace over the start of Insert mode
|
||||||
|
bindkey 'jj' vi-cmd-mode # inoremap jj <Esc>
|
||||||
|
|
||||||
|
# Backward-kill long paths one directory at a time.
|
||||||
|
bindkey '^W' backward-kill-word
|
||||||
|
zstyle ':zle:backward-kill-word' word-style unspecified
|
||||||
|
zstyle ':zle:backward-kill-word' word-chars ' /'
|
||||||
|
|
||||||
|
# Make ^Z resume your suspended job if there is one.
|
||||||
|
autoload fancy-ctrl-z
|
||||||
|
zle -N fancy-ctrl-z
|
||||||
|
bindkey '^Z' fancy-ctrl-z
|
||||||
|
|
||||||
|
# Allow for magic such as url-quote-magic to apply when your terminal supports
|
||||||
|
# bracketed paste.
|
||||||
autoload -Uz bracketed-paste-magic
|
autoload -Uz bracketed-paste-magic
|
||||||
zle -N bracketed-paste bracketed-paste-magic
|
zle -N bracketed-paste bracketed-paste-magic
|
||||||
|
|
||||||
|
# url-quote-magic will automatically quote special chars in URLs pasted into
|
||||||
|
# the terminal.
|
||||||
autoload -Uz url-quote-magic
|
autoload -Uz url-quote-magic
|
||||||
url-quote-magic-with-highlight() {
|
url-quote-magic-with-highlight() { url-quote-magic; _zsh_highlight }
|
||||||
url-quote-magic
|
|
||||||
_zsh_highlight
|
|
||||||
}
|
|
||||||
zle -N self-insert url-quote-magic-with-highlight
|
zle -N self-insert url-quote-magic-with-highlight
|
||||||
|
|
Loading…
Reference in a new issue