Skip to content
Browse files

Init

  • Loading branch information...
0 parents commit eb1fd71f3b7c8cc5dcdb37e705ec45307cc39f93 @datl committed Feb 16, 2012
Showing with 208 additions and 0 deletions.
  1. +1 −0 ackrc
  2. +45 −0 aliases
  3. +10 −0 gemrc
  4. +5 −0 gitignore
  5. +33 −0 irbrc
  6. +10 −0 profile
  7. +15 −0 tmux.conf
  8. +89 −0 zshrc
1 ackrc
@@ -0,0 +1 @@
+--type-add=ruby=.haml,.rake,Gemfile,.coffee
45 aliases
@@ -0,0 +1,45 @@
+# ~/.aliases
+
+#
+# Aliases
+#
+
+# git
+alias gush="git push"
+alias github="gush origin master"
+alias origin="gush origin master"
+alias gist="git status"
+alias gull="git pull"
+alias gadd="git add"
+alias gic="git commit"
+alias gim="git commit -m"
+alias giff="git diff"
+alias upsubs="git submodule foreach git pull origin master"
+
+# rails
+alias sc="rails c"
+alias ss="rails s"
+alias sg="rails g"
+alias scaffold="rails g scaffold"
+alias migrate="rake db:migrate db:test:clone"
+alias remigrate="rake db:migrate:redo db:test:clone"
+alias rst="touch tmp/restart.txt"
+alias tlog="tail -f log/development.log"
+
+# bundle
+alias b="bundle"
+alias be="bundle exec"
+alias bake="bundle exec rake"
+alias s="bundle exec rspec"
+
+# vim
+alias vi="vim"
+alias e="vim"
+alias ge="mvim"
+
+# misc
+alias c="clear"
+alias ls="ls -p"
+alias la="ls -A"
+alias ll="ls -alAghp"
+alias untar="tar -xzvf"
10 gemrc
@@ -0,0 +1,10 @@
+---
+:backtrace: false
+:benchmark: false
+:bulk_threshold: 1000
+:sources:
+- http://gemcutter.org
+- http://gems.rubyforge.org/
+- http://gems.github.com
+:update_sources: true
+:verbose: true
5 gitignore
@@ -0,0 +1,5 @@
+.DS_Store
+*.tmproj
+*.swp
+*.swo
+*.scratch.*
33 irbrc
@@ -0,0 +1,33 @@
+require 'irb/completion'
+require 'irb/ext/save-history'
+require 'open-uri'
+require 'json'
+require 'cgi'
+
+ANSI_YELLOW = "\e[33m"
+ANSI_PURPLE = "\033[35m"
+ANSI_RESET = "\033[0m"
+ANSI_BOLD = "\e[1m"
+
+begin
+ require 'wirble'
+
+ Wirble.init
+ Wirble.colorize
+rescue LoadError => err
+ warn "Couldn't load Wirble: #{err}"
+end
+
+ARGV.concat [ "--readline", "--prompt-mode" ]
+IRB.conf[:SAVE_HISTORY] = 100
+IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history"
+IRB.conf[:AUTO_INDENT] = true
+
+IRB.conf[:PROMPT][:CLOUD] = {
+ :PROMPT_I => "#{ANSI_PURPLE}%N>#{ANSI_RESET}\n ", # normal prompt
+ :PROMPT_S => "#{ANSI_PURPLE}%N%l#{ANSI_RESET}\n ", # prompt for continuing strings
+ :PROMPT_C => "#{ANSI_PURPLE}%N*#{ANSI_RESET}\n ", # prompt for continuing statement
+ :PROMPT_N => "#{ANSI_PURPLE}%N*#{ANSI_RESET}\n ", # "
+ :RETURN => "#{ANSI_PURPLE}=>#{ANSI_RESET}#{ANSI_YELLOW} %s#{ANSI_RESET}\n"
+}
+IRB.conf[:PROMPT_MODE] = :SIMPLE
10 profile
@@ -0,0 +1,10 @@
+# ~/.profile
+
+#
+# ENV
+#
+
+export PATH=$HOME/bin:$HOME/.bin:/usr/local/git/bin:/usr/local/bin:/usr/local/sbin:$PATH
+export MANPATH=/usr/local/git/man:/usr/local/man:$MANPATH
+export EDITOR="vim"
+export CLICOLOR=1
15 tmux.conf
@@ -0,0 +1,15 @@
+# ~/.tmux.conf
+set -g default-terminal "screen-256color"
+
+# act like vim
+setw -g mode-keys vi
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
+bind-key -r C-h select-window -t :-
+bind-key -r C-l select-window -t :+
+
+# act like GNU screen
+unbind C-b
+set -g prefix C-a
89 zshrc
@@ -0,0 +1,89 @@
+# ~/.zshrc
+
+source ~/.profile
+
+# Includes
+autoload colors && colors
+autoload -Uz vcs_info
+autoload -U compinit && compinit
+autoload -U complist
+
+# Bind <C-r> to history search
+bindkey "^r" history-incremental-search-backward
+
+
+# Load aliases
+source ~/.aliases
+
+#
+# History
+#
+HISTFILE=~/.zsh_history
+HISTSIZE=1000
+SAVEHIST=1000
+REPORTTIME=10
+
+setopt NO_BG_NICE
+setopt NO_HUP
+setopt NO_LIST_BEEP
+setopt LOCAL_OPTIONS
+setopt LOCAL_TRAPS
+setopt EXTENDED_HISTORY
+setopt PROMPT_SUBST
+setopt CORRECT
+setopt COMPLETE_IN_WORD
+setopt IGNORE_EOF
+setopt AUTO_CD
+setopt APPEND_HISTORY
+setopt INC_APPEND_HISTORY
+setopt HIST_REDUCE_BLANKS
+
+#
+# ANSI Color Codes
+#
+CLEAR=$reset_color
+RED=$fg[red]
+GREEN=$fg[green]
+YELLOW=$fg[yellow]
+BLUE=$fg[blue]
+PURPLE=$fg[magenta]
+CYAN=$fg[cyan]
+
+#
+# Set prompt style
+#
+ACTION="%{$PURPLE%}:%a%{$CLEAR%}"
+
+zstyle ':vcs_info:*:prompt:*' enable git
+zstyle ':vcs_info:*:prompt:*' check-for-changes true
+zstyle ':vcs_info:*:prompt:*' stagedstr "%{$YELLOW%}"
+zstyle ':vcs_info:*:prompt:*' unstagedstr "%{$GREEN%}"
+zstyle ':vcs_info:*:prompt:*' actionformats "[%{$BLUE%}%u%c%b${ACTION}]%{$CLEAR%} "
+zstyle ':vcs_info:*:prompt:*' formats "%{$BLUE%}%c%u[%c%b%c%u]%{$CLEAR%} "
+zstyle ':vcs_info:*:prompt:*' nvcsformats ""
+
+function precmd {
+ local last=$?
+ local prompt=""
+
+ # Status
+ if [[ $last -eq 0 ]]; then
+ prompt=$GREEN
+ elif [[ $last -eq 1 ]]; then
+ prompt=$YELLOW
+ else
+ prompt=$RED
+ fi
+
+ cursor="%{$prompt%}⚡%{$CLEAR%}"
+ vcs_info 'prompt'
+}
+
+#
+# Set Prompts
+#
+PROMPT=" %~ "'${vcs_info_msg_0_}${cursor}'" %{$CLEAR%}"
+RPROMPT='%T'
+
+# Load RVM function
+[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

0 comments on commit eb1fd71

Please sign in to comment.
Something went wrong with that request. Please try again.