Skip to content

Instantly share code, notes, and snippets.

@isapir
Created April 18, 2025 00:44
Show Gist options
  • Save isapir/8006da9414f2653676600c3ee09b8d3f to your computer and use it in GitHub Desktop.
Save isapir/8006da9414f2653676600c3ee09b8d3f to your computer and use it in GitHub Desktop.
ZSHRC Additions
# allow ? symbols in strings e.g. URLs per https://stackoverflow.com/a/42679697/968244
unsetopt NO_MATCH
# do not add to history if starts with space per https://stackoverflow.com/a/7478584/968244
setopt HIST_IGNORE_SPACE
if [ -f ~/.setenv.sh ]; then
. ~/.setenv.sh
fi
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
bindkey "^U" backward-kill-line
bindkey "^R" history-incremental-search-backward
bindkey "^S" history-incremental-search-forward
bindkey "^[[1;5D" backward-word
bindkey "^[[1;5C" forward-word
## set delimiters for CTRL+W or ALT+BACKSPACE like bash
autoload -U select-word-style
select-word-style bash
export WORDCHARS='.-'
## edit the current line in $EDITOR by clicking Ctrl+X, Ctrl+E
autoload -U edit-command-line
zle -N edit-command-line
bindkey "^X^E" edit-command-line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment