Skip to content

Commit

Permalink
Update 11/2/15
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekreeki committed Feb 12, 2015
1 parent b2d3c69 commit 4527ad8
Show file tree
Hide file tree
Showing 13 changed files with 721 additions and 497 deletions.
4 changes: 4 additions & 0 deletions .aliases → .aliases.zsh
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# SHELL
alias pwdc='pwd | pbcopy'

alias ll='ls -GFhl'
# alias ls='ls -GFhl'

# BUNDLER
alias bi='bundle install'

# RAILS
alias restart='mkdir -p tmp && touch tmp/restart.txt'
alias stop='spring stop'

# GIT
alias gs='git status -s'
Expand Down
8 changes: 8 additions & 0 deletions .colors.zsh
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'
64 changes: 64 additions & 0 deletions .completion.zsh
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
4 changes: 2 additions & 2 deletions .custom → .custom.zsh
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
8 changes: 8 additions & 0 deletions .path → .exports.zsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# GENERAL
export PATH="/Users/mikekreeki/.dotfiles/bin:$PATH"

# HOMEBREW
export PATH="/usr/local/bin:$PATH"
Expand All @@ -18,3 +19,10 @@ PATH=".git/safe/../../bin:$PATH"
# Android SDK
export PATH="/Users/Kreeki/Development/adt-bundle/sdk/platform-tools:$PATH"
export PATH="/Users/Kreeki/Development/adt-bundle/sdk/tools:$PATH"

# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='mvim'
fi
38 changes: 0 additions & 38 deletions .functions

This file was deleted.

55 changes: 55 additions & 0 deletions .functions.zsh
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"
}
5 changes: 3 additions & 2 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
autocorrect = 1

[credential]
helper = osxkeychain
helper = osxkeychain

[filter "media"]
clean = git-media-clean %f
Expand All @@ -86,5 +86,6 @@

[merge]
stat = true

[git-up "bundler"]
autoinstall = true
autoinstall = true
37 changes: 33 additions & 4 deletions .oh-my-zsh → .oh-my-zsh.zsh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Path to your oh-my-zsh installation.
ZSH=$HOME/.oh-my-zsh
# Path to your oh-my-zsh configuration.

# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# ZSH_THEME="mikekreeki"

# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
Expand All @@ -22,8 +23,8 @@ ZSH_THEME="robbyrussell"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment following line if you want to disable command autocorrection
# DISABLE_CORRECTION="true"
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"

# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
Expand All @@ -33,9 +34,37 @@ ZSH_THEME="robbyrussell"
# much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"


# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
HIST_STAMPS="mm/dd/yyyy"

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git zsh-syntax-highlighting)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git bundler zsh-syntax-highlighting)

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

source $ZSH/oh-my-zsh.sh

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
43 changes: 43 additions & 0 deletions .setopt.zsh
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
Loading

0 comments on commit 4527ad8

Please sign in to comment.