Skip to content

Instantly share code, notes, and snippets.

@corydolphin
Created February 11, 2013 01:01
Show Gist options
  • Save corydolphin/4751792 to your computer and use it in GitHub Desktop.
Save corydolphin/4751792 to your computer and use it in GitHub Desktop.
Simple batch script to make using sublime text on windows even better, allows opening of sublime text in the current directory, and as a parameter. Save somewhere on your path, or add to your path.
@ECHO OFF
:: Written by Cory Dolphin (@wcdolphin www.corydolphin.com)
:: Simple batch script to make using sublime text on windows even better
:: Usage: subl [file <default=current directory>]
set sublime_path=C:\Program Files\Sublime Text 2\sublime_text.exe
if "%1" =="" ( :: no parameter, open current directory
START "" "%sublime_path%" %CD%
) else ( :: open file/directory parameter
START "" "%sublime_path%" %1
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment