parent
8189577772
commit
c5a729cc1b
@ -0,0 +1,33 @@
|
||||
Sublime Text
|
||||
====
|
||||
|
||||
Enables Sublime Text aliases
|
||||
|
||||
OSX Search Paths
|
||||
------
|
||||
* /Applications/Sublime Text*/Contents/SharedSupport/bin/subl
|
||||
|
||||
Linux Search Paths
|
||||
------
|
||||
* /usr/bin/sublime_text
|
||||
|
||||
Aliases
|
||||
-------
|
||||
|
||||
### General
|
||||
|
||||
- `st` Opens Sublime Text
|
||||
- 'subl' Opens Sublime Text
|
||||
- `stt` Opens Sublime Text in project mode for the current directory
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
*The authors of this module should be contacted via the [issue tracker][3].*
|
||||
|
||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||
- [Patrick Baker](https://github.com/patbaker82/prezto)
|
||||
|
||||
[1]: http://www.sublimetext.com/
|
||||
[2]: https://github.com/sorin-ionescu/prezto/issues
|
||||
|
@ -0,0 +1,29 @@
|
||||
#
|
||||
# Enable Sublime Text
|
||||
#
|
||||
# Authors:
|
||||
# Patrick Baker <patricksbaker@gmail.com>
|
||||
# Modified version from oh-my-zsh
|
||||
# Original: https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/sublime/sublime.plugin.zsh
|
||||
#
|
||||
local _sublime_darwin_paths
|
||||
_sublime_darwin_paths=(
|
||||
/Applications/Sublime\ Text*/Contents/SharedSupport/bin/subl
|
||||
)
|
||||
|
||||
if [[ "$OSTYPE" == linux* ]]; then
|
||||
if [ -f '/usr/bin/sublime_text' ]; then
|
||||
alias st=st_run
|
||||
st_run() { nohup /usr/bin/sublime_text $@ > /dev/null & }
|
||||
fi
|
||||
elif [[ "$OSTYPE" == darwin* ]]; then
|
||||
for _sublime_path in ${_sublime_darwin_paths}; do
|
||||
if [[ -a "${_sublime_path}" ]]; then
|
||||
alias subl="'${_sublime_path}'"
|
||||
alias st=subl
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
alias stt='st .'
|
Loading…
Reference in new issue