I have an st.bat in my misc directory that looks like this:
| start "" "D:\Programs\Sublime Text 2\sublime_text.exe" %*
|
IIRC, the %* will forward any command line options you pass to the batch file onto the command, so you can type things like
...to open or create particular files. But it's been a while since I made it, so I'm not sure if it's
actually necessary to get that kind of functionality.
I haven't tried it with subilme text, but I did it slightly different with notepad++, and used a doskey= command in the shell.bat script (the one that gets auto executed when opening the cmd shortcut). It looks like this:
| doskey np="D:\Programs\Notepad++\notepad++.exe" $*
|
...for similar functionality as above but with
np rather than
st. These two methods are probably interchangeable, but I haven't
actually tried both with the same program. AFAICT,
doskey is sort of like the window version of unix's
alias?
Note the difference: %* and $*. Someone more knowledgeable at batch files can probably explain this, but if I had to guess it's because %* is a variable within the batch file (note the common % usage) whereas the $* is maybe just a command line option for the
doskey command. Pretty much guessing here, though.