Some changes

This commit is contained in:
Kristofers Solo
2022-04-28 23:52:43 +03:00
parent f66f274160
commit b60c90203d
3 changed files with 70 additions and 71 deletions

View File

@@ -60,26 +60,26 @@ bindkey "^[[3~" delete-char
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# 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[5 q'
fi
}
zle -N zle-keymap-select
zle-line-init() {
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
echo -ne "\e[5 q"
}
zle -N zle-line-init
echo -ne '\e[5 q' # Use beam shape cursor on startup.
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
# # 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[5 q'
# fi
# }
# zle -N zle-keymap-select
# zle-line-init() {
# zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
# echo -ne "\e[5 q"
# }
# zle -N zle-line-init
# echo -ne '\e[5 q' # Use beam shape cursor on startup.
# preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
function cd() {
@@ -133,7 +133,6 @@ autoload -U compinit colors zcalc
compinit -d
colors
autoload -U promptinit; promptinit
prompt spaceship