Home Download Buy Blog Forum Support

sublime2 key binding command exec

sublime2 key binding command exec

Postby atomi on Fri Feb 25, 2011 3:35 am

I looked for documentation but couldn't find any help on this.
Here's what I'm trying
Code: Select all
[
{ "keys": ["ctrl+shift+b"], "command": "exec","cmd": ["ant","build"]}
]


But I'm getting
Code: Select all
[Error 87] The parameter is incorrect
[Finished]

Is there a way I can debug/troubleshoot or get a clue from someone on how to work this out?
atomi
 
Posts: 342
Joined: Thu Jan 20, 2011 5:06 pm
Location: Los Angeles CA US

Re: sublime2 key binding command exec

Postby jps on Fri Feb 25, 2011 3:38 am

You need to wrap the arguments within "args":

Code: Select all
[
    { "keys": ["ctrl+shift+b"], "command": "exec", "args": { "cmd": ["ant","build"]} }
]
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: sublime2 key binding command exec

Postby atomi on Fri Feb 25, 2011 4:21 am

Okay, I'm getting the error:
[Error 2] The system cannot find the file specified
[Finished]

And Ant is in my PATH (win7) - should it be set elsewhere as well?

Thanks.
atomi
 
Posts: 342
Joined: Thu Jan 20, 2011 5:06 pm
Location: Los Angeles CA US

Re: sublime2 key binding command exec

Postby jps on Fri Feb 25, 2011 4:32 am

3 things to try:

- Verify the command that's being run by looking in the console.
- Test that typing 'ant' in a command prompt works
- Ensure you've restarted Sublime Text since adjusting your path
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: sublime2 key binding command exec

Postby atomi on Fri Feb 25, 2011 4:37 am

- Verify the command that's being run by looking in the console.

Code: Select all
Running ant

- Test that typing 'ant' in a command prompt works

Yup ant works on the command prompt just fine.
- Ensure you've restarted Sublime Text since adjusting your path

Unfortunately no change. I'm still getting
Code: Select all
[Error 2] The system cannot find the file specified
[Finished]

Edit: BTW the same error occurs when using the F7 Ant Build tool.

Maybe someone could chime in and confirm this por favor?
atomi
 
Posts: 342
Joined: Thu Jan 20, 2011 5:06 pm
Location: Los Angeles CA US

Re: sublime2 key binding command exec

Postby jps on Fri Feb 25, 2011 4:48 am

Try changing 'ant' to 'ant.bat'
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: sublime2 key binding command exec

Postby atomi on Fri Feb 25, 2011 5:57 am

Of course that was it!
Code: Select all
{ "keys": ["ctrl+shift+b"], "command": "exec", "args": { "cmd": ["ant.bat"]} }


Thanks.
atomi
 
Posts: 342
Joined: Thu Jan 20, 2011 5:06 pm
Location: Los Angeles CA US


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 34 guests