mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-26 14:30:12 +08:00
parent
bc337e9a9e
commit
2527959e79
@ -18,12 +18,12 @@ typeset -g VI_MODE_SET_CURSOR
|
|||||||
# if $VI_MODE_SET_CURSOR=true.
|
# if $VI_MODE_SET_CURSOR=true.
|
||||||
#
|
#
|
||||||
# See https://vt100.net/docs/vt510-rm/DECSCUSR for cursor styles
|
# See https://vt100.net/docs/vt510-rm/DECSCUSR for cursor styles
|
||||||
typeset -g VI_MODE_CURSOR_NORMAL=2
|
typeset -g VI_MODE_CURSOR_NORMAL=${VI_MODE_CURSOR_NORMAL:=2}
|
||||||
typeset -g VI_MODE_CURSOR_VISUAL=6
|
typeset -g VI_MODE_CURSOR_VISUAL=${VI_MODE_CURSOR_VISUAL:=6}
|
||||||
typeset -g VI_MODE_CURSOR_INSERT=6
|
typeset -g VI_MODE_CURSOR_INSERT=${VI_MODE_CURSOR_INSERT:=6}
|
||||||
typeset -g VI_MODE_CURSOR_OPPEND=0
|
typeset -g VI_MODE_CURSOR_OPPEND=${VI_MODE_CURSOR_OPPEND:=0}
|
||||||
|
|
||||||
typeset -g VI_KEYMAP=main
|
typeset -g VI_KEYMAP=${VI_KEYMAP:=main}
|
||||||
|
|
||||||
function _vi-mode-set-cursor-shape-for-keymap() {
|
function _vi-mode-set-cursor-shape-for-keymap() {
|
||||||
[[ "$VI_MODE_SET_CURSOR" = true ]] || return
|
[[ "$VI_MODE_SET_CURSOR" = true ]] || return
|
||||||
@ -162,9 +162,7 @@ if [[ -z "${VI_MODE_DISABLE_CLIPBOARD:-}" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# if mode indicator wasn't setup by theme, define default, we'll leave INSERT_MODE_INDICATOR empty by default
|
# if mode indicator wasn't setup by theme, define default, we'll leave INSERT_MODE_INDICATOR empty by default
|
||||||
if [[ -z "$MODE_INDICATOR" ]]; then
|
typeset -g MODE_INDICATOR=${MODE_INDICATOR:='%B%F{red}<%b<<%f'}
|
||||||
MODE_INDICATOR='%B%F{red}<%b<<%f'
|
|
||||||
fi
|
|
||||||
|
|
||||||
function vi_mode_prompt_info() {
|
function vi_mode_prompt_info() {
|
||||||
echo "${${VI_KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/$INSERT_MODE_INDICATOR}"
|
echo "${${VI_KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/$INSERT_MODE_INDICATOR}"
|
||||||
|
Loading…
Reference in New Issue
Block a user