sublime.plugin.zsh 635 B

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