Skip to content

Instantly share code, notes, and snippets.

@aausch
Last active September 25, 2024 18:43
Show Gist options
  • Save aausch/53c5703ae1eb718a46dd7d623622c401 to your computer and use it in GitHub Desktop.
Save aausch/53c5703ae1eb718a46dd7d623622c401 to your computer and use it in GitHub Desktop.
export PATH=/usr/local/bin:$PATH
# https://github.com/junegunn/fzf
# brew install fzf
source <(fzf --zsh)
# better definitions of keysbindings
key=(
BackSpace "${terminfo[kbs]}"
Home "${terminfo[khome]}"
End "${terminfo[kend]}"
Insert "${terminfo[kich1]}"
Delete "${terminfo[kdch1]}"
Up "${terminfo[kcuu1]}"
Down "${terminfo[kcud1]}"
Left "${terminfo[kcub1]}"
Right "${terminfo[kcuf1]}"
PageUp "${terminfo[kpp]}"
PageDown "${terminfo[knp]}"
)
# Quick search by pressing up/down
bindkey -v
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey Up up-line-or-beginning-search # Up
bindkey Down down-line-or-beginning-search # Down
# Skip back/forwards between words with option-left, option-right
bindkey "^[^[[C" forward-word
bindkey "^[^[[D" backward-word
export EDITOR="vim"
# Stop losing bash history
HISTFILE=~/.zsh-histfile
HISTSIZE=20000
# syntax highlighting
# brew install zsh-syntax-highlighting
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment