Skip to content

Instantly share code, notes, and snippets.

@calebccff
Created February 7, 2020 15:42
Show Gist options
  • Save calebccff/ef01d5e90bb45436f84c8fb4657eba1b to your computer and use it in GitHub Desktop.
Save calebccff/ef01d5e90bb45436f84c8fb4657eba1b to your computer and use it in GitHub Desktop.
# The following lines were added by compinstall
zstyle ':completion:*' completer _expand _complete _ignored _approximate
zstyle ':completion:*' expand prefix suffix
zstyle ':completion:*' format '%d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-suffixes true
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*'
zstyle ':completion:*' max-errors 2
zstyle ':completion:*' menu select=1
zstyle ':completion:*' preserve-prefix '//[^/]##/'
zstyle ':completion:*' select-prompt '%p%s'
zstyle ':completion:*' special-dirs true
zstyle ':completion::complete:*' gain-privileges 1
zstyle :compinstall filename '/home/caleb/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE=~/.local/.histfile
HISTSIZE=8000
SAVEHIST=10009
unsetopt autocd extendedglob nomatch notify
bindkey -v
export TERM=xterm-256color
export EDITOR=$(which xed)
alias cfz="$EDITOR $HOME/.zshrc"
alias ls="ls --color=auto"
alias la="ls -la"
alias l="ls -lh"
alias x="chmod +x"
alias sz="source ~/.zshrc"
alias adb="sudo adb" #BAD hack
alias neofetch="neofetch --colors 4 1 8 8 8 7"
alias vim=nvim
export PATH=$PATH:$HOME/development/flutter/bin
export PATH=$PATH:$HOME/Android/Sdk/platform-tools/
# End of lines configured by zsh-newuser-install
source ~/powerlevel10k/powerlevel10k.zsh-theme
source ~/powerlevel10k/.purepower
# This is important, it makes keybinds work...
bindkey -e
# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo
typeset -g -A key
key[Home]="${terminfo[khome]}"
key[End]="${terminfo[kend]}"
key[Insert]="${terminfo[kich1]}"
key[Backspace]="${terminfo[kbs]}"
key[Delete]="${terminfo[kdch1]}"
key[Up]="${terminfo[kcuu1]}"
key[Down]="${terminfo[kcud1]}"
key[Left]="${terminfo[kcub1]}"
key[Right]="${terminfo[kcuf1]}"
key[PageUp]="${terminfo[kpp]}"
key[PageDown]="${terminfo[knp]}"
key[ShiftTab]="${terminfo[kcbt]}"
# setup key accordingly
[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode
[[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char
[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char
[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-history
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-history
[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char
[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history
[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history
[[ -n "${key[ShiftTab]}" ]] && bindkey -- "${key[ShiftTab]}" reverse-menu-complete
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
autoload -Uz add-zle-hook-widget
function zle_application_mode_start {
echoti smkx
}
function zle_application_mode_stop {
echoti rmkx
}
add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
fi
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search
# Enable autosuggestions
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
# Enable syntax highlighting
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
export PATH="$PATH:$HOME/.dotnet/tools"
export PATH=$PATH:$HOME/development/flutter/.pub-cache/bin
export PATH=$PATH:/usr/lib/jvm/java-13-jdk/bin/
alias d="cd $HOME/docs/code/d":
alias z="source $HOME/.zshrc"
alias suod=sudo
alias sduo=sudo
alias soud=sudo
alias sodu=sudo
# Created by `userpath` on 2019-10-29 14:18:59
export PATH="$PATH:/home/caleb/.local/bin"
# Install Ruby Gems to ~/gems
export GEM_HOME="$HOME/gems"
export PATH="$HOME/.gem/ruby/2.7.0/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment