Home Download Buy Blog Forum Support

Command to run cmd script on file

Command to run cmd script on file

Postby n00ge on Wed Jul 28, 2010 2:27 am

How would it be possible to process a file via command line with Sublime's keybindings? I'd like to toy around with Less CSS (http://lesscss.org/) and would like a keybinding on save to run 'lessc (filename)'. Thanks.
http://twitter.com/n00ge
Sublime Text 3 dev builds | OS X 10.8.2 & Ubuntu 13.04
n00ge
 
Posts: 140
Joined: Mon Oct 05, 2009 1:23 am

Re: Command to run cmd script on file

Postby n00ge on Wed Jul 28, 2010 2:52 am

Right now I've tried to run these:
<binding key="f8" command="exec 'lessc &quot;$File&quot;'" /> - this does nothing
<binding key="f8" command="exec lessc '&quot;$File&quot;'"/> - this just runs the file
http://twitter.com/n00ge
Sublime Text 3 dev builds | OS X 10.8.2 & Ubuntu 13.04
n00ge
 
Posts: 140
Joined: Mon Oct 05, 2009 1:23 am

Re: Command to run cmd script on file

Postby n00ge on Wed Jul 28, 2010 3:06 am

Nevermind, I got it:
<binding key="f8" command="exec '' 'lessc &quot;$File&quot;'"/>
http://twitter.com/n00ge
Sublime Text 3 dev builds | OS X 10.8.2 & Ubuntu 13.04
n00ge
 
Posts: 140
Joined: Mon Oct 05, 2009 1:23 am

Re: Command to run cmd script on file

Postby tgkeul on Wed Jul 28, 2010 6:31 pm

Good to know. I'm sure I will need it.
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm

Re: Command to run cmd script on file

Postby dragoon on Fri Feb 04, 2011 12:46 pm

How can I do this with Sublime Text 2?
dragoon
 
Posts: 1
Joined: Fri Feb 04, 2011 12:34 pm

Re: Command to run cmd script on file

Postby willi297 on Fri Feb 04, 2011 8:40 pm

Just ran into this yesterday and asked Jon. Apparently, it is not possible in v2.x yet, and isn't on the radar. I've added a feature request to Jon's fancy new tracker, but it BADLY needs some votes to get noticed:

http://sublimetext.userecho.com/feedbac ... -bindings/
Greg Williams
Atomic Embedded, USA
http://atomicembedded.com
willi297
 
Posts: 121
Joined: Wed Nov 18, 2009 8:29 pm
Location: Grand Rapids, MI, USA


Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests