3 replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
source | link

You've already found zle-keymap-select which is executed whenever the mode changes. You could use it to set some other visual indicator than the prompt, depending on what your terminal supports it (and your taste in mode indicator display, of course).

There is a standard terminfo capabilityterminfo capability to change the shape of the cursor. However some terminals display the same cursor in both modes. Xterm's notion of a less visible cursor is to make it blink (and this must be enabled with the -bc command line argument or cursorBlink resource).

zle-keymap-select () {
  case $KEYMAP in
    vicmd) print -rn -- $terminfo[cvvis];; # block cursor
    viins|main) print -rn -- $terminfo[cnorm];; # less visible cursor
  esac
}

With some terminals, you can also change the cursor color with print -n '\e]12;pink\a' (by color name) or print -n '\e]12;#abcdef\a' (by RGB specification). These sequences are described in the xterm documentation, in the ctlseqs file; modern terminal emulators typically emulate xterm, though they might not support all its features.

You've already found zle-keymap-select which is executed whenever the mode changes. You could use it to set some other visual indicator than the prompt, depending on what your terminal supports it (and your taste in mode indicator display, of course).

There is a standard terminfo capability to change the shape of the cursor. However some terminals display the same cursor in both modes. Xterm's notion of a less visible cursor is to make it blink (and this must be enabled with the -bc command line argument or cursorBlink resource).

zle-keymap-select () {
  case $KEYMAP in
    vicmd) print -rn -- $terminfo[cvvis];; # block cursor
    viins|main) print -rn -- $terminfo[cnorm];; # less visible cursor
  esac
}

With some terminals, you can also change the cursor color with print -n '\e]12;pink\a' (by color name) or print -n '\e]12;#abcdef\a' (by RGB specification). These sequences are described in the xterm documentation, in the ctlseqs file; modern terminal emulators typically emulate xterm, though they might not support all its features.

You've already found zle-keymap-select which is executed whenever the mode changes. You could use it to set some other visual indicator than the prompt, depending on what your terminal supports it (and your taste in mode indicator display, of course).

There is a standard terminfo capability to change the shape of the cursor. However some terminals display the same cursor in both modes. Xterm's notion of a less visible cursor is to make it blink (and this must be enabled with the -bc command line argument or cursorBlink resource).

zle-keymap-select () {
  case $KEYMAP in
    vicmd) print -rn -- $terminfo[cvvis];; # block cursor
    viins|main) print -rn -- $terminfo[cnorm];; # less visible cursor
  esac
}

With some terminals, you can also change the cursor color with print -n '\e]12;pink\a' (by color name) or print -n '\e]12;#abcdef\a' (by RGB specification). These sequences are described in the xterm documentation, in the ctlseqs file; modern terminal emulators typically emulate xterm, though they might not support all its features.

2 mention the `main` alias to `viins`
source | link

You've already found zle-keymap-select which is executed whenever the mode changes. You could use it to set some other visual indicator than the prompt, depending on what your terminal supports it (and your taste in mode indicator display, of course).

There is a standard terminfo capability to change the shape of the cursor. However some terminals display the same cursor in both modes. Xterm's notion of a less visible cursor is to make it blink (and this must be enabled with the -bc command line argument or cursorBlink resource).

zle-keymap-select () {
  case $KEYMAP in
    vicmd) print -rn -- $terminfo[cvvis];; # block cursor
    viinsviins|main) print -rn -- $terminfo[cnorm];; # less visible cursor
  esac
}

With some terminals, you can also change the cursor color with print -n '\e]12;pink\a' (by color name) or print -n '\e]12;#abcdef\a' (by RGB specification). These sequences are described in the xterm documentation, in the ctlseqs file; modern terminal emulators typically emulate xterm, though they might not support all its features.

You've already found zle-keymap-select which is executed whenever the mode changes. You could use it to set some other visual indicator than the prompt, depending on what your terminal supports it (and your taste in mode indicator display, of course).

There is a standard terminfo capability to change the shape of the cursor. However some terminals display the same cursor in both modes. Xterm's notion of a less visible cursor is to make it blink (and this must be enabled with the -bc command line argument or cursorBlink resource).

zle-keymap-select () {
  case $KEYMAP in
    vicmd) print -rn -- $terminfo[cvvis];; # block cursor
    viins) print -rn -- $terminfo[cnorm];; # less visible cursor
  esac
}

With some terminals, you can also change the cursor color with print -n '\e]12;pink\a' (by color name) or print -n '\e]12;#abcdef\a' (by RGB specification). These sequences are described in the xterm documentation, in the ctlseqs file; modern terminal emulators typically emulate xterm, though they might not support all its features.

You've already found zle-keymap-select which is executed whenever the mode changes. You could use it to set some other visual indicator than the prompt, depending on what your terminal supports it (and your taste in mode indicator display, of course).

There is a standard terminfo capability to change the shape of the cursor. However some terminals display the same cursor in both modes. Xterm's notion of a less visible cursor is to make it blink (and this must be enabled with the -bc command line argument or cursorBlink resource).

zle-keymap-select () {
  case $KEYMAP in
    vicmd) print -rn -- $terminfo[cvvis];; # block cursor
    viins|main) print -rn -- $terminfo[cnorm];; # less visible cursor
  esac
}

With some terminals, you can also change the cursor color with print -n '\e]12;pink\a' (by color name) or print -n '\e]12;#abcdef\a' (by RGB specification). These sequences are described in the xterm documentation, in the ctlseqs file; modern terminal emulators typically emulate xterm, though they might not support all its features.

1
source | link

You've already found zle-keymap-select which is executed whenever the mode changes. You could use it to set some other visual indicator than the prompt, depending on what your terminal supports it (and your taste in mode indicator display, of course).

There is a standard terminfo capability to change the shape of the cursor. However some terminals display the same cursor in both modes. Xterm's notion of a less visible cursor is to make it blink (and this must be enabled with the -bc command line argument or cursorBlink resource).

zle-keymap-select () {
  case $KEYMAP in
    vicmd) print -rn -- $terminfo[cvvis];; # block cursor
    viins) print -rn -- $terminfo[cnorm];; # less visible cursor
  esac
}

With some terminals, you can also change the cursor color with print -n '\e]12;pink\a' (by color name) or print -n '\e]12;#abcdef\a' (by RGB specification). These sequences are described in the xterm documentation, in the ctlseqs file; modern terminal emulators typically emulate xterm, though they might not support all its features.