ae1fe0029c63debfe44dcba52761389c6c876b31
- Author
- Gaetan Semet <gaetan@xeberon.net>
- Committer
- Gaetan Semet <gaetan@xeberon.net>
- Date
Message
Add support for sublime 3
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
Diff
1diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh
2index 72f56754cf237db0ca0a29713d14ae1f4c5578c2..5662791839d77cdaa1c162ae4f45a98b3c4db554 100755
3--- a/plugins/sublime/sublime.plugin.zsh
4+++ b/plugins/sublime/sublime.plugin.zsh
5@@ -2,30 +2,32 @@
6
7 local _sublime_darwin_paths > /dev/null 2>&1
8 _sublime_darwin_paths=(
9- "/usr/local/bin/subl"
10- "$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
11- "$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
12- "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
13- "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
14+ "/usr/local/bin/subl"
15+ "$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
16+ "$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
17+ "$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
18+ "/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
19+ "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
20+ "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
21 )
22
23 if [[ $('uname') == 'Linux' ]]; then
24- if [ -f '/usr/bin/sublime_text' ]; then
25- st_run() { nohup /usr/bin/sublime_text $@ > /dev/null & }
26- else
27- st_run() { nohup /usr/bin/sublime-text $@ > /dev/null & }
28- fi
29- alias st=st_run
30+ if [ -f '/usr/bin/sublime_text' ]; then
31+ st_run() { nohup /usr/bin/sublime_text $@ > /dev/null & }
32+ else
33+ st_run() { nohup /usr/bin/sublime-text $@ > /dev/null & }
34+ fi
35+ alias st=st_run
36
37 elif [[ $('uname') == 'Darwin' ]]; then
38
39- for _sublime_path in $_sublime_darwin_paths; do
40- if [[ -a $_sublime_path ]]; then
41- alias subl="'$_sublime_path'"
42- alias st=subl
43- break
44- fi
45- done
46+ for _sublime_path in $_sublime_darwin_paths; do
47+ if [[ -a $_sublime_path ]]; then
48+ alias subl="'$_sublime_path'"
49+ alias st=subl
50+ break
51+ fi
52+ done
53 fi
54
55 alias stt='st .'