Created
May 19, 2013 15:32
-
-
Save manutter51/5608004 to your computer and use it in GitHub Desktop.
Cygwin command line helper for Sublime Text 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### INSTALLATION: | |
### Add the following 4 lines to your .bashrc or .bash_profile | |
### # source the sublimerc file if it exists | |
### if [ -f "${HOME}/.sublimerc" ] ; then | |
### source "${HOME}/.sublimerc" | |
### fi | |
### | |
### Strip off the leading "### " of course. | |
# Edit this so your path includes the path to Sublime Text | |
export PATH="$PATH:/cygdrive/c/Program Files/Sublime Text 2/" | |
### You should not need to edit anything below this line | |
export SUBLIME_EXE="sublime_text.exe" | |
subfn() { | |
tu="" | |
for t in $@ ; do | |
tu="$tu `cygpath --windows $t`" ; | |
done | |
$SUBLIME_EXE $tu 2>&1 >>~/.sublime.log & | |
} | |
alias sub=subfn | |
echo "Sublime Text 2 available as 'sub <filename(s)>' command." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment