]> git.rmz.io Git - dotfiles.git/blob - zsh/plugins/sublime/sublime.plugin.zsh
1b2cbcdce16ce101454ea8a931f4416926c90efc
[dotfiles.git] / zsh / plugins / sublime / sublime.plugin.zsh
1 # Sublime Text 2 Aliases
2 #unamestr = 'uname'
3
4 local _sublime_darwin_subl=/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
5
6 if [[ $('uname') == 'Linux' ]]; then
7 if [ -f '/usr/bin/sublime_text' ]; then
8 st_run() { nohup /usr/bin/sublime_text $@ > /dev/null & }
9 else
10 st_run() { nohup /usr/bin/sublime-text $@ > /dev/null & }
11 fi
12 alias st=st_run
13 elif [[ $('uname') == 'Darwin' ]]; then
14 # Check if Sublime is installed in user's home application directory
15 if [[ -a $HOME/${_sublime_darwin_subl} ]]; then
16 alias st='$HOME/${_sublime_darwin_subl}'
17 else
18 alias st='${_sublime_darwin_subl}'
19 fi
20 fi
21 alias stt='st .'