sublime.plugin.zsh 842 B

12345678910111213141516171819202122232425262728293031
  1. # Sublime Text 2 Aliases
  2. local _sublime_darwin_paths > /dev/null 2>&1
  3. _sublime_darwin_paths=(
  4. "/usr/local/bin/subl"
  5. "$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
  6. "$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
  7. "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
  8. "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
  9. )
  10. if [[ $('uname') == 'Linux' ]]; then
  11. if [ -f '/usr/bin/sublime_text' ]; then
  12. st_run() { nohup /usr/bin/sublime_text $@ > /dev/null & }
  13. else
  14. st_run() { nohup /usr/bin/sublime-text $@ > /dev/null & }
  15. fi
  16. alias st=st_run
  17. elif [[ $('uname') == 'Darwin' ]]; then
  18. for _sublime_path in $_sublime_darwin_paths; do
  19. if [[ -a $_sublime_path ]]; then
  20. alias subl="'$_sublime_path'"
  21. alias st=subl
  22. break
  23. fi
  24. done
  25. fi
  26. alias stt='st .'