summaryrefslogtreecommitdiff
path: root/.config/zsh/functions.zsh
blob: cca1d2903e0efe310e54da7547333ce262e0a249 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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
}