<commit_before># Updates editor information when the keymap changes.
function zle-keymap-select() {
  # update keymap variable for the prompt
  VI_KEYMAP=$KEYMAP

  zle reset-prompt
  zle -R
}

function zle-line-init() {
    zle -K viins;
}

zle -N zle-line-init
zle -N zle-keymap-select

# enable vi keymap
bindkey -v

# This function is used in the prompt.
# For example:
#
#setopt PROMPT_SUBST
#PROMPT='$(vi_mode_status)'
function vi_mode_status() {
  local VI_NORMAL_MODE_INDICATOR='%(?.%F{blue}•%f%F{cyan}•%f%F{green}•%f.%F{red}•••%f) '
  local VI_INSERT_MODE_INDICATOR='%(?.%F{blue}❯%f%F{cyan}❯%f%F{green}❯%f.%F{red}❯❯❯%f) '
  if [[ "$VI_KEYMAP" == "vicmd" ]]; then
      echo "$VI_NORMAL_MODE_INDICATOR"
  else
      echo "$VI_INSERT_MODE_INDICATOR"
  fi
}<commit_msg>zsh: decrease esc delay and change cursor depending on vi mode<commit_after># Updates editor information when the keymap changes.
function zle-keymap-select() {
  # update keymap variable for the prompt
  VI_KEYMAP=$KEYMAP

  # change cursor depending on mode.
  # Block cursor in "normal" mode, Beam in insert mode.
  if [[ "$VI_KEYMAP" == "vicmd" ]]; then
      echo -ne '\e[1 q'
  else
      echo -ne '\e[5 q'
  fi

  zle reset-prompt
  zle -R
}

function zle-line-init() {
    zle -K viins;
}

zle -N zle-line-init
zle -N zle-keymap-select

# enable vi keymap
bindkey -v

# Reduce esc delay
export KEYTIMEOUT=1

# This function is used in the prompt.
# For example:
#
#setopt PROMPT_SUBST
#PROMPT='$(vi_mode_status)'
function vi_mode_status() {
  local normal_mode_indicator='%(?.%F{blue}•%f%F{cyan}•%f%F{green}•%f.%F{red}•••%f) '
  local insert_mode_indicator='%(?.%F{blue}❯%f%F{cyan}❯%f%F{green}❯%f.%F{red}❯❯❯%f) '
  if [[ "$VI_KEYMAP" == "vicmd" ]]; then
      echo "$normal_mode_indicator"
  else
      echo "$insert_mode_indicator"
  fi
}
{'fraction_non_alphanumeric': 0.15916575192096596, 'fraction_numerical': 0.001646542261251372, 'mean_word_length': 4.092178770949721, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7540046', 'n_tokens_mistral': 796, 'n_tokens_neox': 779, 'n_words': 173}