zsh: revert to simpler widget naming
This commit is contained in:
parent
0e18599a8d
commit
589f310ef8
1 changed files with 4 additions and 5 deletions
|
@ -16,20 +16,19 @@ set_cursor_shape() {
|
|||
}
|
||||
|
||||
# Start new prompts with bar shaped cursor.
|
||||
init_line_editor() {
|
||||
zle-line-init() {
|
||||
set_cursor_shape bar
|
||||
}
|
||||
zle -N zle-line-init
|
||||
|
||||
# Switch cursor shape depending on editing mode.
|
||||
keymap_did_change() {
|
||||
zle-keymap-select() {
|
||||
case $KEYMAP in
|
||||
vicmd) set_cursor_shape block ;;
|
||||
viins|main) set_cursor_shape bar ;;
|
||||
esac
|
||||
}
|
||||
|
||||
zle -N zle-line-init init_line_editor
|
||||
zle -N zle-keymap-select keymap_did_change
|
||||
zle -N zle-keymap-select
|
||||
|
||||
# Use vi mode for line editing.
|
||||
bindkey -v
|
||||
|
|
Loading…
Add table
Reference in a new issue