-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2d3c69
commit 4527ad8
Showing
13 changed files
with
721 additions
and
497 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Setup terminal, and turn on colors | ||
export TERM=xterm-256color | ||
export CLICOLOR=1 | ||
export LSCOLORS=Gxfxcxdxbxegedabagacad | ||
|
||
# Enable color in grep | ||
export GREP_OPTIONS='--color=auto' | ||
export GREP_COLOR='3;33' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# add in zsh-completions | ||
fpath=(/usr/local/share/zsh-completions $fpath) | ||
|
||
autoload -U compinit && compinit | ||
zmodload -i zsh/complist | ||
|
||
# man zshcontrib | ||
zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' | ||
zstyle ':vcs_info:*' formats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f ' | ||
zstyle ':vcs_info:*' enable git #svn cvs | ||
|
||
# Enable completion caching, use rehash to clear | ||
zstyle ':completion::complete:*' use-cache on | ||
zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST | ||
|
||
# Fallback to built in ls colors | ||
zstyle ':completion:*' list-colors '' | ||
|
||
# Make the list prompt friendly | ||
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s' | ||
|
||
# Make the selection prompt friendly when there are a lot of choices | ||
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s' | ||
|
||
# Add simple colors to kill | ||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' | ||
|
||
# list of completers to use | ||
zstyle ':completion:*::::' completer _expand _complete _ignored _approximate | ||
|
||
zstyle ':completion:*' menu select=1 _complete _ignored _approximate | ||
|
||
# insert all expansions for expand completer | ||
# zstyle ':completion:*:expand:*' tag-order all-expansions | ||
|
||
# match uppercase from lowercase | ||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | ||
|
||
# offer indexes before parameters in subscripts | ||
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters | ||
|
||
# formatting and messages | ||
zstyle ':completion:*' verbose yes | ||
zstyle ':completion:*:descriptions' format '%B%d%b' | ||
zstyle ':completion:*:messages' format '%d' | ||
zstyle ':completion:*:warnings' format 'No matches for: %d' | ||
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b' | ||
zstyle ':completion:*' group-name '' | ||
|
||
# ignore completion functions (until the _ignored completer) | ||
zstyle ':completion:*:functions' ignored-patterns '_*' | ||
zstyle ':completion:*:scp:*' tag-order files users 'hosts:-host hosts:-domain:domain hosts:-ipaddr"IP\ Address *' | ||
zstyle ':completion:*:scp:*' group-order files all-files users hosts-domain hosts-host hosts-ipaddr | ||
zstyle ':completion:*:ssh:*' tag-order users 'hosts:-host hosts:-domain:domain hosts:-ipaddr"IP\ Address *' | ||
zstyle ':completion:*:ssh:*' group-order hosts-domain hosts-host users hosts-ipaddr | ||
zstyle '*' single-ignored show | ||
|
||
# ZAW styles | ||
zstyle ':filter-select:highlight' matched fg=yellow,standout | ||
zstyle ':filter-select' max-lines 10 # use 10 lines for filter-select | ||
zstyle ':filter-select' max-lines -10 # use $LINES - 10 for filter-select | ||
zstyle ':filter-select' rotate-list yes # enable rotation for filter-select | ||
zstyle ':filter-select' case-insensitive yes # enable case-insensitive search | ||
zstyle ':filter-select' extended-search no # see below |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Load RVM into a shell session *as a function* | ||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | ||
|
||
# EDITOR | ||
export EDITOR=mvim | ||
# Setup fzf | ||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Open file in EDITOR | ||
function e() { | ||
if [ "$1" = "" ] | ||
then | ||
exec $EDITOR . | ||
else | ||
exec $EDITOR "$1" | ||
fi | ||
} | ||
|
||
# Switch to subdirectory | ||
function c() { | ||
dir=$(ls | fzf --query="$1") | ||
if [[ -n "$dir" ]]; then | ||
cd $dir | ||
fi | ||
} | ||
|
||
# Switch projects | ||
function p() { | ||
proj=$(ls ~/Projects | fzf --query="$1") | ||
if [[ -n "$proj" ]]; then | ||
cd ~/Projects/$proj | ||
fi | ||
} | ||
|
||
# Tail development log | ||
function log(){ | ||
tail -f -n 100 log/development.log | ||
} | ||
|
||
# Detect empty enter, execute git status if in git dir | ||
magic-enter () { | ||
if [[ -z $BUFFER ]]; then | ||
if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then | ||
echo -ne '\n' | ||
git status | ||
fi | ||
zle accept-line | ||
else | ||
zle accept-line | ||
fi | ||
} | ||
zle -N magic-enter | ||
bindkey "^M" magic-enter | ||
|
||
f() { | ||
eval $(([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s | sed 's/ *[0-9]* *//') | ||
} | ||
fe() { | ||
local file | ||
file=$(fzf --query="$1" --select-1 --exit-0) | ||
[ -n "$file" ] && ${EDITOR:-vim} "$file" | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
unsetopt MENU_COMPLETE | ||
setopt AUTO_MENU | ||
|
||
# Basics | ||
|
||
# If you type foo, and it isn't a command, and it is a directory in your cdpath, go there | ||
setopt AUTO_CD | ||
|
||
# Allow comments even in interactive shells (especially for Muness) | ||
setopt INTERACTIVE_COMMENTS | ||
|
||
# History | ||
|
||
# Allow multiple terminal sessions to all append to one zsh command history | ||
setopt APPEND_HISTORY | ||
|
||
# Add commands as they are typed, don't wait until shell exit | ||
setopt INC_APPEND_HISTORY | ||
|
||
# Do not write events to history that are duplicates of previous events | ||
setopt HIST_IGNORE_DUPS | ||
|
||
# When searching history don't display results already cycled through twice | ||
setopt HIST_FIND_NO_DUPS | ||
|
||
# Remove extra blanks from each command line being added to history | ||
setopt HIST_REDUCE_BLANKS | ||
|
||
# Include more information about when the command was executed, etc | ||
setopt EXTENDED_HISTORY | ||
|
||
# ===== Completion | ||
|
||
# Allow completion from within a word/phrase | ||
setopt COMPLETE_IN_WORD | ||
|
||
# When completing from the middle of a word, move the cursor to the end of the word | ||
setopt ALWAYS_TO_END | ||
|
||
# ===== Prompt | ||
|
||
# Enable parameter expansion, command substitution, and arithmetic expansion in the prompt | ||
setopt PROMPT_SUBST |
Oops, something went wrong.