mirror of
https://github.com/meineerde/dotfiles.git
synced 2026-04-02 13:51:38 +00:00
Cleanup and change to new default editor on Mac: Sublime Text 2
This commit is contained in:
parent
9bf39f0c57
commit
3df75d8c90
18
.bashrc
18
.bashrc
@ -78,11 +78,17 @@ fi
|
|||||||
case `uname` in
|
case `uname` in
|
||||||
Darwin)
|
Darwin)
|
||||||
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home"
|
export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home"
|
||||||
if [[ $(which mate) ]]; then
|
|
||||||
|
# this requires a symlink from "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
|
||||||
|
# into $PATH, e.g. ~/bin/subl
|
||||||
|
if [[ $(which subl) ]]; then
|
||||||
|
export EDITOR="subl -n"
|
||||||
|
export SVN_EDITOR="subl -nw"
|
||||||
|
elif [[ $(which mate) ]]; then
|
||||||
export EDITOR="mate"
|
export EDITOR="mate"
|
||||||
export SVN_EDITOR="mate -wl1"
|
export SVN_EDITOR="mate -wl1"
|
||||||
fi
|
fi
|
||||||
function fullscreen() { printf "\e[3;0;0;t\e[8;0;0t"; return 0; }
|
|
||||||
alias ls='ls -G'
|
alias ls='ls -G'
|
||||||
|
|
||||||
python="$(which python)"
|
python="$(which python)"
|
||||||
@ -96,13 +102,11 @@ case `uname` in
|
|||||||
python_path=$(cd "$(dirname "$python")" && cd "$(dirname "$target")" && pwd)
|
python_path=$(cd "$(dirname "$python")" && cd "$(dirname "$target")" && pwd)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for p in "$python_path" /usr/local/*/bin /usr/*/bin; do
|
for p in "$python_path" /usr/local/*/bin /usr/*/bin; do
|
||||||
if [[ -n "$p" ]]; then
|
if [[ -n "$p" ]]; then
|
||||||
export PATH=$p:$PATH
|
export PATH=$p:$PATH
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
unset p python python_path
|
unset p python python_path
|
||||||
|
|
||||||
export PG_DATA=/usr/local/var/postgres
|
export PG_DATA=/usr/local/var/postgres
|
||||||
@ -236,8 +240,6 @@ alias sc="script/console"
|
|||||||
alias rs="rails server -b 127.0.0.1"
|
alias rs="rails server -b 127.0.0.1"
|
||||||
alias rc="rails console"
|
alias rc="rails console"
|
||||||
|
|
||||||
alias redcar="wrapped_redcar --fork"
|
|
||||||
|
|
||||||
# if cat is called on a directory, call ls instead
|
# if cat is called on a directory, call ls instead
|
||||||
cat() {
|
cat() {
|
||||||
if [[ $# = 1 ]] && [[ -d $1 ]]; then
|
if [[ $# = 1 ]] && [[ -d $1 ]]; then
|
||||||
@ -271,10 +273,10 @@ with_project() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# cd to project
|
# cd to project
|
||||||
c() { with_project $1 cd; }
|
c() { with_project "$1" cd; }
|
||||||
|
|
||||||
# open project in editor
|
# open project in editor
|
||||||
e() { with_project $1 $EDITOR; }
|
e() { with_project "$1" "$EDITOR"; }
|
||||||
|
|
||||||
# Enable programmable completion features.
|
# Enable programmable completion features.
|
||||||
if [[ -f /etc/bash_completion ]]; then . /etc/bash_completion; fi
|
if [[ -f /etc/bash_completion ]]; then . /etc/bash_completion; fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user