From 2983aebbb726c072b1d67c7f3c35fae4e34781fb Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sun, 18 Nov 2012 19:39:39 -0500 Subject: [PATCH] Switched to zsh, reworked vim plugins --- .gitmodules | 21 +++ README.md | 8 +- gitconfig => git/gitconfig | 0 go | 0 setup | 171 ++++++++++++++++++ setup.sh | 151 ---------------- vim.sh | 41 ----- less.vim => vim/less.vim | 0 vim/plugins/ervandew/supertab | 1 + vim/plugins/msanders/snipmate.vim | 1 + vim/plugins/scrooloose/nerdtree | 1 + vim/plugins/scrooloose/syntastic | 1 + vim/plugins/tpope/vim-fugitive | 1 + vim/plugins/vim-scripts/Command-T | 1 + .../vim-scripts/Flex-Development-Support | 1 + vimrc => vim/vimrc | 0 zsh/zsh-theme | 7 + bashrc => zsh/zshrc | 106 +++-------- 18 files changed, 233 insertions(+), 279 deletions(-) create mode 100644 .gitmodules rename gitconfig => git/gitconfig (100%) create mode 100644 go create mode 100755 setup delete mode 100755 setup.sh delete mode 100755 vim.sh rename less.vim => vim/less.vim (100%) create mode 160000 vim/plugins/ervandew/supertab create mode 160000 vim/plugins/msanders/snipmate.vim create mode 160000 vim/plugins/scrooloose/nerdtree create mode 160000 vim/plugins/scrooloose/syntastic create mode 160000 vim/plugins/tpope/vim-fugitive create mode 160000 vim/plugins/vim-scripts/Command-T create mode 160000 vim/plugins/vim-scripts/Flex-Development-Support rename vimrc => vim/vimrc (100%) create mode 100644 zsh/zsh-theme rename bashrc => zsh/zshrc (52%) mode change 100755 => 100644 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..b80942c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,21 @@ +[submodule "vim/plugins/ervandew/supertab"] + path = vim/plugins/ervandew/supertab + url = git@github.com:ervandew/supertab.git +[submodule "vim/plugins/msanders/snipmate.vim"] + path = vim/plugins/msanders/snipmate.vim + url = git@github.com:msanders/snipmate.vim.git +[submodule "vim/plugins/scrooloose/nerdtree"] + path = vim/plugins/scrooloose/nerdtree + url = git@github.com:scrooloose/nerdtree.git +[submodule "vim/plugins/scrooloose/syntastic"] + path = vim/plugins/scrooloose/syntastic + url = git@github.com:scrooloose/syntastic.git +[submodule "vim/plugins/tpope/vim-fugitive"] + path = vim/plugins/tpope/vim-fugitive + url = git@github.com:tpope/vim-fugitive.git +[submodule "vim/plugins/vim-scripts/Command-T"] + path = vim/plugins/vim-scripts/Command-T + url = git@github.com:vim-scripts/Command-T.git +[submodule "vim/plugins/vim-scripts/Flex-Development-Support"] + path = vim/plugins/vim-scripts/Flex-Development-Support + url = git@github.com:vim-scripts/Flex-Development-Support.git diff --git a/README.md b/README.md index 78cb6c3..73865bf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,2 @@ - just my mother fuckin' - eeeee eeeee eeeee eeee e e eeee eeeee - 8 8 8 88 8 8 8 8 8 8 " - 8e 8 8 8 8e 8eee 8e 8e 8eee 8eeee - 88 8 8 8 88 88 88 88 88 88 - 88ee8 8eee8 88 88 88 88eee 88ee 8ee88 \ No newline at end of file +joshtronic dotfiles +=================== diff --git a/gitconfig b/git/gitconfig similarity index 100% rename from gitconfig rename to git/gitconfig diff --git a/go b/go new file mode 100644 index 0000000..e69de29 diff --git a/setup b/setup new file mode 100755 index 0000000..9b93506 --- /dev/null +++ b/setup @@ -0,0 +1,171 @@ +#!/bin/bash + +DOTFILES="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Links .gitconfig +if [ -e ~/.gitconfig ] || [ -h ~/.gitconfig ]; +then + rm ~/.gitconfig +fi + +ln -s $DOTFILES/git/gitconfig ~/.gitconfig + +if [ `uname` == 'Darwin' ]; +then + # Links .gitshots + if [ -e ~/.gitshots ] || [ -h ~/.gitshots ]; + then + ln -s ~/Dropbox/Pictures/Git\ Shots ~/.gitshots + fi + + # Initialize the `locate` database + sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist + + # Installs Homebrew + if [ `which brew` == '' ]; + then + ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go) + mkdir -p ~/Library/LaunchAgents + fi + + # Gets our `brew` on + brew install bash-completion git htop imagemagick imagesnap macvim memcached multitail mysql nginx nmap redis ssh-copy-id wget flex_sdk postgresql p7zip + + # Allows htop to show all processes + sudo chown root:wheel /usr/local/Cellar/htop-osx/0.8.2/bin/htop + sudo chmod u+s /usr/local/Cellar/htop-osx/0.8.2/bin/htop + + # # Initializes databases + # mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp + + # initdb /usr/local/var/postgres + + # # Sets up our LaunchAgent + # launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist + # cp /usr/local/Cellar/memcached/1.4.15/homebrew.mxcl.memcached.plist ~/Library/LaunchAgents/ + # launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist + # + # launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.redis.plist + # cp /usr/local/Cellar/redis/2.4.17/homebrew.mxcl.redis.plist ~/Library/LaunchAgents/ + # launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.redis.plist + # + # launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist + # cp /usr/local/Cellar/postgresql/9.2.1/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ + # launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist + # + # # `brew`s up some PHP 5.3 + # brew tap homebrew/dupes + # brew tap josegonzalez/homebrew-php + # + # # Backs up the stock OSX version of PHP + # if [ ! -f /usr/libexec/apache2/libphp5.so.orig ]; + # then + # sudo mv /usr/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.so.orig + # fi + # + # brew remove php53 + # rm ~/.pearrc + # launchctl unload -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php53.plist + # rm ~/Library/LaunchAgents/homebrew-php.josegonzalez.php53.plist + # + # # Installs PHP as an Apache module + # brew install php53 --with-mysql --with-suhosin + # sudo cp /usr/local/Cellar/php53/5.3.16/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.so + # brew remove php53 + # + # # Installs PHP for Nginx (via FPM) + # brew install php53 --with-fpm --with-mysql --with-pgsql --with-suhosin + # cp /usr/local/Cellar/php53/5.3.16/homebrew-php.josegonzalez.php53.plist ~/Library/LaunchAgents/ + # launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php53.plist + # + # # Gets PHP how we like it + # brew install php53-imagick php53-mcrypt php53-memcache php53-xdebug --with-homebrew-php + # + # # Adds some PEAR to the recipe + # pear update-channels + # sudo pear upgrade-all + # sudo pear channel-discover pear.phpunit.de + # sudo pear channel-discover components.ez.no + # sudo pear channel-discover pear.symfony.com + # sudo pear install --alldeps phpunit/PHPUnit + # sudo pear install --alldeps phpdocumentor + + # Links the homebrew apps + #brew linkapps + + # Installs git hooks + sudo ln -s $PWD/git/hooks/post-commit /usr/local/share/git-core/templates/hooks/post-commit +else + # Gives us access to `add-apt-repository` + sudo apt-get install python-software-properties + + # # Adds the PostgreSQL repository so we can install 9.2 + # sudo add-apt-repository ppa:pitti/postgresql + # + # # Updates the package list + # sudo apt-get update + # + # # Purges PostgreSQL 9.1 just in case + # # Seems this tries to remove 9.2 as well, leaving in just in case I need to run it + # # sudo apt-get --purge remove postgresql postgresql-9.1 postgresql-client-9.1 postgresql-client-common postgresql-common postgresql-doc postgresql-doc-9.1 + # + # # Installs CLI apps + # sudo apt-get install vim ssh multitail htop iotop git-core ruby1.8-dev nginx php5 php5-cgi php5-cli php-pear php5-suhosin php5-fpm redis-server memcached php5-memcache php5-memcached php5-gd php5-curl php5-imagick php5-pgsql exim4-daemon-light postgresql-9.2 +fi + +# Links .vimrc +if [ -e ~/.vimrc ] || [ -h ~/.vimrc ]; +then + rm ~/.vimrc +fi + +ln -s $DOTFILES/vimrc ~/.vimrc + +# Pulls down and installs vim plugins +DOTVIM=~/.vim + +if [ -d $DOTVIM ]; +then + rm -r $DOTVIM +fi + +mkdir $DOTVIM + +OWNERS=( "ervandew" "msanders" "scrooloose" "scrooloose" "tpope" "vim-scripts" "vim-scripts" ) +REPOS=( "supertab" "snipmate.vim" "nerdtree" "syntastic" "vim-fugitive" "Command-T" "Flex-Development-Support" ) + +for (( i = 0; i < ${#OWNERS[@]}; i++ )) +do + cp -R $DOTFILES/vim/plugins/${OWNERS[$i]}/${REPOS[$i]}/* $DOTVIM +done + +cp $DOTFILES/vim/less.vim $DOTVIM/syntax + +# Finish up Command-T installation +cd $DOTVIM/ruby/command-t +ruby extconf.rb +make + +# Installs Oh my zsh! +if [ ! -d ~/.oh-my-zsh ]; +then + curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh +fi + +# Links theme +if [ -e ~/.oh-my-zsh/themes/joshtronic.zsh-theme ] || [ -h ~/.oh-my-zsh/themes/joshtronic.zsh-theme ]; +then + rm ~/.oh-my-zsh/themes/joshtronic.zsh-theme +fi + +ln -s $DOTFILES/zsh/zsh-theme ~/.oh-my-zsh/themes/joshtronic.zsh-theme + +# Links .zshrc +if [ -e ~/.zshrc ] || [ -h ~/.zshrc ]; +then + rm ~/.zshrc +fi + +ln -s $DOTFILES/zsh/zshrc ~/.zshrc + +echo; echo "SETUP COMPLETE!!~!" diff --git a/setup.sh b/setup.sh deleted file mode 100755 index 902746e..0000000 --- a/setup.sh +++ /dev/null @@ -1,151 +0,0 @@ -#!/bin/bash - -PWD=`pwd` - -# Copies .gitconfig -if [ -f ~/.gitconfig ]; -then - rm ~/.gitconfig -fi - -ln -s $PWD/gitconfig ~/.gitconfig - -if [ `uname` == 'Darwin' ]; -then - ln -s ~/Dropbox/Pictures/Git\ Shots ~/.gitshots - - # Initialize the `locate` database - sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist - - # Installs Homebrew - if [ `which brew` == '' ]; - then - ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go) - mkdir -p ~/Library/LaunchAgents - fi - - # Gets our `brew` on - brew install bash-completion git htop imagemagick imagesnap macvim memcached multitail mysql nginx nmap redis ssh-copy-id wget flex_sdk postgresql p7zip - - # Allows htop to show all processes - sudo chown root:wheel /usr/local/Cellar/htop-osx/0.8.2/bin/htop - sudo chmod u+s /usr/local/Cellar/htop-osx/0.8.2/bin/htop - - # Initializes databasesL - mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp - - initdb /usr/local/var/postgres - - # Sets up our LaunchAgent - launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist - cp /usr/local/Cellar/memcached/1.4.15/homebrew.mxcl.memcached.plist ~/Library/LaunchAgents/ - launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist - - launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.redis.plist - cp /usr/local/Cellar/redis/2.4.17/homebrew.mxcl.redis.plist ~/Library/LaunchAgents/ - launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.redis.plist - - launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist - cp /usr/local/Cellar/postgresql/9.2.1/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ - launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist - - # `brew`s up some PHP 5.3 - brew tap homebrew/dupes - brew tap josegonzalez/homebrew-php - - # Backs up the stock OSX version of PHP - if [ ! -f /usr/libexec/apache2/libphp5.so.orig ]; - then - sudo mv /usr/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.so.orig - fi - - brew remove php53 - rm ~/.pearrc - launchctl unload -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php53.plist - rm ~/Library/LaunchAgents/homebrew-php.josegonzalez.php53.plist - - # Installs PHP as an Apache module - brew install php53 --with-mysql --with-suhosin - sudo cp /usr/local/Cellar/php53/5.3.16/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.so - brew remove php53 - - # Installs PHP for Nginx (via FPM) - brew install php53 --with-fpm --with-mysql --with-pgsql --with-suhosin - cp /usr/local/Cellar/php53/5.3.16/homebrew-php.josegonzalez.php53.plist ~/Library/LaunchAgents/ - launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php53.plist - - # Gets PHP how we like it - brew install php53-imagick php53-mcrypt php53-memcache php53-xdebug --with-homebrew-php - - # Adds some PEAR to the recipe - pear update-channels - sudo pear upgrade-all - sudo pear channel-discover pear.phpunit.de - sudo pear channel-discover components.ez.no - sudo pear channel-discover pear.symfony.com - sudo pear install --alldeps phpunit/PHPUnit - sudo pear install --alldeps phpdocumentor - - brew linkapps - - # Clears out the old .bash_profile - if [ -f ~/.bash_profile ]; - then - rm ~/.bash_profile - fi - - # Adds paths and custom .bashrc - echo " -export PATH=\"/usr/local/sbin:$PWD/git/scripts:/usr/local/Cellar/flex_sdk/4.6.0.23201/libexec/bin:/usr/local/Cellar/php53/5.3.16/bin:$PATH\" - -if [ -f $PWD/bashrc ] && ! shopt -oq posix; -then - . $PWD/bashrc -fi - -if [ -f `brew --prefix`/etc/bash_completion ]; -then - . `brew --prefix`/etc/bash_completion -fi -" >> ~/.bash_profile - - # Installs my git hooks - sudo ln -s $PWD/git/hooks/post-commit /usr/local/share/git-core/templates/hooks/post-commit -else - # Gives us access to `add-apt-repository` - sudo apt-get install python-software-properties - - # Adds the PostgreSQL repository so we can install 9.2 - sudo add-apt-repository ppa:pitti/postgresql - - # Updates the package list - sudo apt-get update - - # Purges PostgreSQL 9.1 just in case - # Seems this tries to remove 9.2 as well, leaving in just in case I need to run it - # sudo apt-get --purge remove postgresql postgresql-9.1 postgresql-client-9.1 postgresql-client-common postgresql-common postgresql-doc postgresql-doc-9.1 - - # Installs CLI apps - sudo apt-get install vim ssh multitail htop iotop git-core ruby1.8-dev nginx php5 php5-cgi php5-cli php-pear php5-suhosin php5-fpm redis-server memcached php5-memcache php5-memcached php5-gd php5-curl php5-imagick php5-pgsql exim4-daemon-light postgresql-9.2 - - # Clears out the old .bashrc - if [ -f ~/.bashrc ]; - then - rm ~/.bashrc - fi - - # Grabs the skeleton .bashrc - cp /etc/skel/.bashrc ~/.bashrc - - # Adds paths and custom .bashrc - echo " -export PATH=\"$PWD/git/scripts:$PATH\" - -if [ -f $PWD/bashrc ] && ! shopt -oq posix; then - . $PWD/bashrc -fi" >> ~/.bashrc -fi - -./vim.sh - -echo; echo "SETUP COMPLETE!!~!" diff --git a/vim.sh b/vim.sh deleted file mode 100755 index 224a598..0000000 --- a/vim.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -PWD=`pwd` - -# Copies .vimrc -if [ -f ~/.vimrc ]; -then - rm ~/.vimrc -fi - -ln -s $PWD/vimrc ~/.vimrc - -# Pulls down and installs vim plugins -DOTVIM=~/.vim - -if [ -d $DOTVIM ]; -then - rm -r $DOTVIM -fi - -mkdir $DOTVIM - -echo - -OWNERS=( "ervandew" "msanders" "nvie" "scrooloose" "scrooloose" "tpope" "vim-scripts" "vim-scripts" ) -REPOS=( "supertab" "snipmate.vim" "vim-togglemouse" "nerdtree" "syntastic" "vim-fugitive" "Command-T" "Flex-Development-Support" ) - -for (( i = 0 ; i < ${#OWNERS[@]} ; i++ )) -do - git clone git://github.com/${OWNERS[$i]}/${REPOS[$i]}.git /tmp/${REPOS[$i]} - cp -R /tmp/${REPOS[$i]}/* $DOTVIM - rm -rf /tmp/${REPOS[$i]} - echo -done - -cp ./less.vim $DOTVIM/syntax - -# Finish up Command-T installation -cd $DOTVIM/ruby/command-t -ruby extconf.rb -make diff --git a/less.vim b/vim/less.vim similarity index 100% rename from less.vim rename to vim/less.vim diff --git a/vim/plugins/ervandew/supertab b/vim/plugins/ervandew/supertab new file mode 160000 index 0000000..e299037 --- /dev/null +++ b/vim/plugins/ervandew/supertab @@ -0,0 +1 @@ +Subproject commit e2990372442fdf026cc1ef458abdf9a1a4e891ef diff --git a/vim/plugins/msanders/snipmate.vim b/vim/plugins/msanders/snipmate.vim new file mode 160000 index 0000000..f5a75d0 --- /dev/null +++ b/vim/plugins/msanders/snipmate.vim @@ -0,0 +1 @@ +Subproject commit f5a75d075d3c005ebe69e3f5e56cf99516e8aa3b diff --git a/vim/plugins/scrooloose/nerdtree b/vim/plugins/scrooloose/nerdtree new file mode 160000 index 0000000..1dc3891 --- /dev/null +++ b/vim/plugins/scrooloose/nerdtree @@ -0,0 +1 @@ +Subproject commit 1dc3891f960c25aa3f23aa46f5afc8d41db38233 diff --git a/vim/plugins/scrooloose/syntastic b/vim/plugins/scrooloose/syntastic new file mode 160000 index 0000000..36db8f4 --- /dev/null +++ b/vim/plugins/scrooloose/syntastic @@ -0,0 +1 @@ +Subproject commit 36db8f4b164a5f72e5f1b914521c284c82d0b407 diff --git a/vim/plugins/tpope/vim-fugitive b/vim/plugins/tpope/vim-fugitive new file mode 160000 index 0000000..003f38c --- /dev/null +++ b/vim/plugins/tpope/vim-fugitive @@ -0,0 +1 @@ +Subproject commit 003f38c6a4d8e3d527e4e1dfeab6fdf05c8ff149 diff --git a/vim/plugins/vim-scripts/Command-T b/vim/plugins/vim-scripts/Command-T new file mode 160000 index 0000000..8df5676 --- /dev/null +++ b/vim/plugins/vim-scripts/Command-T @@ -0,0 +1 @@ +Subproject commit 8df5676d30bac725db6c9f86fb1c997f65eaa2fb diff --git a/vim/plugins/vim-scripts/Flex-Development-Support b/vim/plugins/vim-scripts/Flex-Development-Support new file mode 160000 index 0000000..f98b17f --- /dev/null +++ b/vim/plugins/vim-scripts/Flex-Development-Support @@ -0,0 +1 @@ +Subproject commit f98b17f50576f3684489f2ec554c9f10e0751748 diff --git a/vimrc b/vim/vimrc similarity index 100% rename from vimrc rename to vim/vimrc diff --git a/zsh/zsh-theme b/zsh/zsh-theme new file mode 100644 index 0000000..919e7ec --- /dev/null +++ b/zsh/zsh-theme @@ -0,0 +1,7 @@ +PROMPT='%{$fg[green]%}%*%{$reset_color%}:%{$fg[white]%}%n%{$reset_color%}@%{$fg[magenta]%}%m%{$reset_color%}:%{$fg_bold[blue]%}%~%{$fg[yellow]%}$(git_prompt_info) +%{$fg[white]%}%# %{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg_bold[yellow]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}✗%{$fg_bold[yellow]%})%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}✔%{$fg_bold[yellow]%})%{$reset_color%}" diff --git a/bashrc b/zsh/zshrc old mode 100755 new mode 100644 similarity index 52% rename from bashrc rename to zsh/zshrc index 5604548..8f20639 --- a/bashrc +++ b/zsh/zshrc @@ -1,85 +1,16 @@ -# To use, simply add the following to: -# /etc/bash.bashrc or ~/.bashrc (Linux) -# ~/.bash_profile (Mac OS X) -# -# if [ -f /path/to/this/bash.bashrc ] && ! shopt -oq posix; -# then -# . /path/to/this/bash.bashrc -# fi +export TERM="xterm-256color" -if [ `uname` == "Darwin" ]; -then - # Tell ls to be colourful - export CLICOLOR=1 - export LSCOLORS=Exfxcxdxbxegedabagacad +ZSH=$HOME/.oh-my-zsh - # Tell grep to highlight matches - export GREP_OPTIONS='--color=auto' +ZSH_THEME="joshtronic" - export PATH=/usr/local/bin:/usr/local/sbin:$PATH - export EDITOR="mvim -v" -else - export PATH="$HOME/Source/bash:$PATH" - export EDITOR=vim -fi +COMPLETION_WAITING_DOTS="true" -export GIT_PS1_SHOWDIRTYSTATE=true -export GIT_PS1_SHOWSTASHSTATE=true -export GIT_PS1_SHOWUNTRACKEDFILE=true -export GIT_PS1_SHOWUPSTREAM="auto" +plugins=(brew git nyan osx vi-mode) -# Regular Colors -export BLACK="\[\033[0;30m\]" -export RED="\[\033[0;31m\]" -export GREEN="\[\033[0;32m\]" -export YELLOW="\[\033[0;33m\]" -export BLUE="\[\033[0;34m\]" -export MAGENTA="\[\033[0;35m\]" -export CYAN="\[\033[0;36m\]" -export WHITE="\[\033[0;37m\]" -export RESET="\[\033[0;38m\]" +source $ZSH/oh-my-zsh.sh -# Bold Colors -export B_BLACK="\[\033[1;30m\]" -export B_RED="\[\033[1;31m\]" -export B_GREEN="\[\033[1;32m\]" -export B_YELLOW="\[\033[1;33m\]" -export B_BLUE="\[\033[1;34m\]" -export B_MAGENTA="\[\033[1;35m\]" -export B_CYAN="\[\033[1;36m\]" -export B_WHITE="\[\033[1;37m\]" - -# Darker Colors -export D_BLACK="\[\033[2;30m\]" -export D_RED="\[\033[2;31m\]" -export D_GREEN="\[\033[2;32m\]" -export D_YELLOW="\[\033[2;33m\]" -export D_BLUE="\[\033[2;34m\]" -export D_MAGENTA="\[\033[2;35m\]" -export D_CYAN="\[\033[2;36m\]" -export D_WHITE="\[\033[2;37m\]" - -# Prompt -if [[ $EUID -ne 0 ]]; -then - if [[ $HOSTNAME == "aurora" ]]; - then - export PS1="\n$D_WHITE\u$RESET@$D_MAGENTA\h$RESET:$B_BLUE\w\n$D_WHITE\$ $RESET" - else - export PS1="\n$D_WHITE\u$RESET@$D_MAGENTA\h$RESET:$B_BLUE\w$YELLOW\$(__git_ps1)\n$D_WHITE\$ $RESET" - fi -else - if [[ $HOSTNAME == "aurora" ]]; - then - export PS1="\n$D_WHITE\u$RESET@$D_MAGENTA\h$RESET:$B_BLUE\w\n$B_RED# $RESET" - else - export PS1="\n$D_WHITE\u$RESET@$D_MAGENTA\h$RESET:$B_BLUE\w$YELLOW\$(__git_ps1)\n$B_RED# $RESET" - fi -fi - -export PS2="$D_WHITE> $RESET" - -# Aliases +export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/Cellar/php53/5.3.16/lib/php/:/usr/local/sbin:/Users/josh/Source/dotfiles/git/scripts:/usr/local/Cellar/flex_sdk/4.6.0.23201/libexec/bin:/usr/local/Cellar/php53/5.3.16/bin:/usr/local/bin:/usr/local/sbin:/usr/local/sbin:/Users/josh/Library/LaunchAgents/git/scripts:/usr/local/Cellar/flex_sdk/4.6.0.23201/libexec/bin:/usr/local/bin:/usr/local/sbin:/Users/josh/Source/dotfiles/git/scripts:/usr/local/bin:/usr/local/sbin:/Users/josh/Source/dotfiles/git/scripts:/usr/local/bin:/usr/local/sbin:/Users/josh/Source/dotfiles/git:/usr/local/bin:/usr/local/sbin:/Users/josh/Source/dotfiles/git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/X11/bin:/usr/local/Cellar/flex_sdk/4.6.0.23201/libexec/bin:/usr/local/Cellar/php53/5.3.16/lib/php/File # apt-* alias ac="sudo apt-cache" @@ -147,24 +78,37 @@ alias myfr="mysql faveroo" alias myst="mysql street" alias myud="mysql urbandealight" +# quit +alias quit="exit" + # rsync alias rsync="rsync --compress --progress" # service alias service="sudo service" -# vim -if [ `uname` == "Darwin" ]; +# vim (and some other stuff) +if [[ `uname` == "Darwin" ]]; then alias vim='mvim -v' alias v='mvim -v' alias vd="mvimdiff -v" alias vo="mvim -v -O" + + # Tell ls to be colourful + export CLICOLOR=1 + export LSCOLORS=Exfxcxdxbxegedabagacad + + # Tell grep to highlight matches + export GREP_OPTIONS='--color=auto' + + export PATH=/usr/local/bin:/usr/local/sbin:$PATH + export EDITOR="mvim -v" else alias v="vim" alias vd="vimdiff" alias vo="vim -O" + + export PATH="$HOME/Source/bash:$PATH" + export EDITOR=vim fi - -# Add autocomplete to `g` alias -complete -o default -o nospace -F _git g