Skip to content

Instantly share code, notes, and snippets.

@arcticmatt
Last active April 7, 2021 18:42
Show Gist options
  • Save arcticmatt/ab3d9a855408c7a5879a366d1f8b90b2 to your computer and use it in GitHub Desktop.
Save arcticmatt/ab3d9a855408c7a5879a366d1f8b90b2 to your computer and use it in GitHub Desktop.
##### STARTUP
echo "hello mlim"
RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}"
RPS2=$RPS1
##### BINDINGS
bindkey "^R" history-incremental-search-backward
bindkey "\e[A" history-beginning-search-backward
bindkey "\e[B" history-beginning-search-forward
##### VIM STUFF
bindkey '\e' vi-cmd-mode
# Make Vi mode transitions faster (KEYTIMEOUT is in hundredths of a second)
export KEYTIMEOUT=1
function zle-line-init zle-keymap-select {
RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}"
RPS2=$RPS1
zle reset-prompt
}
zle -N zle-line-init
zle -N zle-keymap-select
##### HISTORY
HISTFILE=~/.zsh_history
HISTSIZE=100000000
SAVEHIST=100000000
setopt INC_APPEND_HISTORY
setopt HIST_FIND_NO_DUPS
setopt HIST_IGNORE_DUPS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment