Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

sublime pluginn : Added alias for Sublime Text 2 on Linux #1122

Merged
merged 2 commits into from

5 participants

@varunkvv

Detects the platform using "uname", and sets the alias accordingly.
If you are using Linux, this assumes that you have created a
symbolic link to /usr/bin/sublime_text.

Varun Vijayaraghavan
varun.kvv@gmail.com

varunv added some commits
@varunv varunv Add Sublime Text 2 alias for Linux.
Detects the platform using "uname", and sets the alias accordingly.
If you are using Linux, this assumes that you have created a
symbolic link to /usr/bin/sublime_text.
6f859c5
@varunv varunv Fixed a bug in checking the platform 8923694
@robbyrussell robbyrussell merged commit 0370de5 into robbyrussell:master
@robbyrussell robbyrussell merged commit 8923694 into robbyrussell:master
@lwe
lwe commented

FYI, this breaks sublime on mac os x (at least for me), should keep for os x:

alias st='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'
@docas docas referenced this pull request from a commit in joekychen/oh-my-zsh
@docas docas Docas.io synced with 0370de5: Merge pull request #1122 from varunkvv/…
…master
20dbc09
@docas docas referenced this pull request from a commit in joekychen/oh-my-zsh
@docas docas Docas.io synced with 0370de5: Merge pull request #1122 from varunkvv/…
…master
baec594
@nXqd

@lwe same here, does it work with the other ones ?
Otherwise, I will create a pull on this one :)

@lwe
lwe commented

@nXqd the MacOS X issue has long been fixed AFAIK, have you tried updating your oh-my-zsh installation?
Actual plugin contains the correct path to the subl binary for OS X: https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/sublime/sublime.plugin.zsh

@nXqd

this is what i get from which st and it doesn't work for me. I already get the lastest oh-my-zsh, still do not know if it's zsh local variable doesn't work or else. I'm not so familiar with shell programming

st: aliased to ${_sublime_darwin_subl}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 21, 2012
  1. @varunv

    Add Sublime Text 2 alias for Linux.

    varunv authored
    Detects the platform using "uname", and sets the alias accordingly.
    If you are using Linux, this assumes that you have created a
    symbolic link to /usr/bin/sublime_text.
Commits on May 24, 2012
  1. @varunv
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 plugins/sublime/sublime.plugin.zsh
View
8 plugins/sublime/sublime.plugin.zsh 100644 → 100755
@@ -1,3 +1,9 @@
# Sublime Text 2 Aliases
-alias st='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'
+#unamestr = 'uname'
+
+if [[ $('uname') == 'Linux' ]]; then
+ alias st='/usr/bin/sublime_text&'
+elif [[ $('uname') == 'Darwin' ]]; then
+ alias st='open -a /Applications/Sublime Text 2.app'
+fi
alias stt='st .'
Something went wrong with that request. Please try again.