-
-
Save wayneeseguin/944150 to your computer and use it in GitHub Desktop.
Dr. Nic's wild and wonderous dotfiles editor setup
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 definitions | |
# | |
use_textmate () | |
{ | |
# Clean redcar from path the easy way. | |
export PATH="$(printf "$PATH" | sed -e "s#${projects_path}/ruby_apps/redcar/bin##g")" | |
export EDITOR="/usr/local/bin/mate -w" | |
export GEM_OPEN_EDITOR="/usr/local/bin/mate" | |
alias tm_dialog="$HOME/Library/Application\ Support/TextMate/PlugIns/Dialog.tmplugin/Contents/Resources/tm_dialog" | |
} | |
# What is this used for, if anything? Duplicated in use_redcar_dev() below. | |
use_redcar_gem () | |
{ | |
export EDITOR="rvm jruby exec redcar -w" | |
export GEM_OPEN_EDITOR="redcar" | |
} | |
use_redcar_dev () | |
{ | |
export PATH="${projects_path}/ruby_apps/redcar/bin:$PATH" | |
export EDITOR="rvm jruby exec redcar -w" | |
export GEM_OPEN_EDITOR="redcar" | |
} | |
m() | |
{ | |
local _path="${1:-'.'}" | |
$EDITOR "${_path}" | |
} | |
# | |
# Environment Settings | |
# | |
# Set projects path (development path) | |
export projects_path="$HOME/Projects" | |
# Setup the editor environment when the dotfiles are sourced when a shell opens. | |
if rvm list strings | grep -q jruby | |
then | |
use_redcar_dev | |
else | |
# don't try to run redcar if jruby not installed | |
use_textmate | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment