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

3
local _sublime_darwin_paths > /dev/null 2>&1
4
_sublime_darwin_paths=(
5
	"/usr/local/bin/subl"
6
	"$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
7
	"$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
8
	"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
9
	"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
10
)
11

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

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

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

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