mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-24 17:55:37 +00:00
19 lines
527 B
Plaintext
19 lines
527 B
Plaintext
### Activate vi / vim mode:
|
|
bindkey -v
|
|
|
|
# Remove delay when entering normal mode (vi)
|
|
KEYTIMEOUT=5
|
|
|
|
# Change cursor shape for different vi modes.
|
|
function zle-keymap-select {
|
|
if [[ $KEYMAP == vicmd ]] || [[ $1 = 'block' ]]; then
|
|
echo -ne '\e[1 q'
|
|
elif [[ $KEYMAP == main ]] || [[ $KEYMAP == viins ]] || [[ $KEYMAP = '' ]] || [[ $1 = 'beam' ]]; then
|
|
echo -ne '\e[6 q'
|
|
fi
|
|
}
|
|
zle -N zle-keymap-select
|
|
|
|
# Start with beam shape cursor on zsh startup and after every command.
|
|
zle-line-init() { zle-keymap-select 'beam'}
|