sublime.plugin.zsh 774 Bytes
Newer Older
Dylan Hudson's avatar
Dylan Hudson committed
1
# Sublime Text 2 Aliases
2

3
4
5
6
7
8
9
local _sublime_darwin_paths
_sublime_darwin_paths=(
	"$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
	"$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
	"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
	"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
)
10

11
if [[ $('uname') == 'Linux' ]]; then
12
	if [ -f '/usr/bin/sublime_text' ]; then
13
		st_run() { nohup /usr/bin/sublime_text $@ > /dev/null & }
14
	else
15
		st_run() { nohup /usr/bin/sublime-text $@ > /dev/null & }
16
	fi
17
18
	alias st=st_run

19
elif  [[ $('uname') == 'Darwin' ]]; then
20
21
22
23
24
25

	for _sublime_path in $_sublime_darwin_paths; do
		if [[ -a $_sublime_path ]]; then
			alias st="'$_sublime_path'"
		fi
	done
26
fi
27

Dylan Hudson's avatar
Dylan Hudson committed
28
alias stt='st .'