# Editors # export export KEYTIMEOUT=10 export EDITOR=nvim export VISUAL=nvim export PAGER=cat export MANPAGER="nvim +Man!" export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 setopt AUTO_CD setopt AUTO_PUSHD setopt PUSHD_IGNORE_DUPS setopt PUSHD_SILENT setopt EXTENDED_GLOB setopt HIST_IGNORE_DUPS setopt HIST_FIND_NO_DUPS setopt HIST_REDUCE_BLANKS setopt SHARE_HISTORY setopt APPEND_HISTORY setopt INC_APPEND_HISTORY setopt PROMPT_SUBST HISTFILE=~/.zsh_history HISTSIZE=10000 SAVEHIST=10000 PROMPT='%n :: %~ :: ' bindkey -v bindkey '^F' autosuggest-accept bindkey '^E' edit-command-line autoload -Uz edit-command-line autoload -Uz compinit autoload -Uz vcs_info zle -N edit-command-line # alias alias ..="cd .." alias ...="cd ../.." alias ....="cd ../../.." alias ports="ss -tulpn" alias mem="free -h" alias cpu="lscpu | sed -n '1,12p'" alias top="btop" alias vim="nvim" alias vi="nvim" alias server="python -m http.server 8000" alias ll="ls -hal" alias checkpoint="git add . && git commit -m 'checkpoint' && git push" alias attach="tmux attach-session -t" alias new="tmux new-session -s" alias list="tmux list-sessions" alias ta="tmux attach" alias tls="tmux list-sessions" alias copypath="pwd | xsel --clipboard" alias copy="xsel --clipboard" alias t="todocli" alias weather="curl wttr.in" alias zshconfig="nvim ~/.zshrc" alias reload="source ~/.zshrc" # credits to luca memleak() { while true do grep -E "VmRSS|VmSize|VmPeak" /proc/70409/status sleep 1 done } # jump to the root of the project groot() { local root=$(git rev-parse --show-toplevel 2>/dev/null) if [[ -n "$root" ]]; then cd "$root" else echo "Not in a git repository" return 1 fi } if command -v fzf &> /dev/null; then source <(fzf --zsh) fi