Created
April 26, 2011 16:25
-
-
Save drnic/942597 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function use_textmate () { | |
export EDITOR="/usr/local/bin/mate -w" | |
export GEM_OPEN_EDITOR="/usr/local/bin/mate" | |
alias tm_dialog=~/"Library/Application\ Support/TextMate/PlugIns/Dialog.tmplugin/Contents/Resources/tm_dialog" | |
} | |
function use_redcar_gem () { | |
export EDITOR="rvm jruby exec redcar -w" | |
export GEM_OPEN_EDITOR="redcar" | |
} | |
function use_redcar_dev () { | |
export PATH="/Users/drnic/Projects/ruby_apps/redcar/bin:$PATH" | |
export EDITOR="rvm jruby exec redcar -w" | |
export GEM_OPEN_EDITOR="redcar" | |
} | |
# don't try to run redcar if jruby not installed | |
if rvm list strings | grep -q jruby | |
then | |
use_redcar_dev | |
else | |
use_textmate | |
fi | |
function m { | |
if [ "$1" != "" ]; then | |
$EDITOR $1 | |
else | |
$EDITOR . | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment