Created
October 27, 2016 21:31
-
-
Save GhostSquad57/00a91e1575d5031a3725450910ea7139 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export LD_LIBRARY_PATH=/usr/lib:/usr/lib32:/usr/lib64:/opt/cuda/lib64 | |
# starts tmux automatically if we're using URXVT | |
#if [[ $TERM == "rxvt-unicode-256color" ]]; then | |
# tmux attach || tmux new | |
#fi | |
autoload -U compinit promptinit zsh-mime-setup | |
compinit | |
promptinit | |
zsh-mime-setup | |
# If we have a glob this will expand it | |
setopt GLOB_COMPLETE | |
setopt PUSHD_MINUS | |
# Case insensitive globbing | |
setopt NO_CASE_GLOB | |
# load colors | |
autoload -U colors && colors | |
# my prompt | |
PROMPT="%{$fg[cyan]%}%n@%{$fg[yellow]%}%M:%{$fg[red]%}$TTY %{$fg[white]%}%~ %{$reset_color%}%#: " | |
# my alias' | |
alias grep='grep --color=always' | |
alias ls='ls --color=always -F -h' | |
alias dirs='dirs -vp' | |
export EDITOR='vim' | |
# auto insert -v options | |
for c in cp rm chmod chown rename mv perl-rename mkdir; do | |
alias $c="$c -v" | |
done | |
# command completion | |
autoload -U compinit | |
compinit | |
# auto-completion with keyboard | |
zstyle ':completion:*' menu select | |
# case insensitive completion | |
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | |
# generate descriptions with magic | |
zstyle ':completion:*' auto-description 'specify: %d' | |
# autocompletion of command line switches for alias | |
setopt completealiases | |
# vi-like keybindings for zsh | |
#bindkey -v # uncomment for vi keybindings | |
DIRSTACKSIZE=20 # set limit for allowed dirs in pushd hist | |
# 1st option always pushd after dir change | |
# 2nd option don't print dirs list after popd | |
# 3rd option swaps meaning of popd +3 & popd -3 | |
# last option says to ignore dup dirs in dirs list | |
setopt autopushd pushdsilent pushdminus pushdignoredups | |
# History stuff | |
HISTFILE=~/.zhistory | |
SAVEHIST=1000 | |
HISTSIZE=1000 | |
# Prevent from putting duplicate lines in the history | |
setopt HIST_SAVE_NO_DUPS | |
setopt HIST_IGNORE_ALL_DUPS | |
setopt HIST_FIND_NO_DUPS | |
# Write after each command | |
setopt INC_APPEND_HISTORY | |
# rehash automatically so new files in $PATH are found for auto-completion | |
zstyle ':completion:*' rehash true | |
# Disable "flow control" which locks terminal when pressing ctrl-s | |
stty -ixon | |
# Key Stuff | |
autoload zkbd | |
bindkey "^F" history-beginning-search-forward # Ctrl+f | |
bindkey "^B" history-beginning-search-backward # Ctrl+b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment