Home Download Buy Blog Forum Support

Sublime Text X 20110110

Re: Sublime Text X 20110110

Postby chewie54 on Wed Jan 12, 2011 3:25 am

I use ant to build java programs. Can I specify ant somehow in the new build system?
Thanks in advance.
chewie54
 
Posts: 6
Joined: Wed Jan 12, 2011 3:20 am

Re: Sublime Text X 20110110

Postby jps on Wed Jan 12, 2011 3:36 am

You'll need to make a new .sublime-build file, which specifies ant. I'd imagine it'd look something like:

Code: Select all
{
   "cmd": ["ant"],
   "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
}


Save this as Ant.sublime-build under %APPDATA%/Sublime Text X/Packages/User (assuming you're using windows), restart Sublime Text X, and there will be an 'Ant' option in the build systems menu.

If "ant" isn't in your path, then you can modify the cmd to include the full path to it.

The file_regex works that same as lineNumberRegex in Sublime Text 1.x (docs for which are at http://www.sublimetext.com/docs/build), except it also supports an optional 4th capture for the error message, which will be displayed in the status bar.
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20110110

Postby elmer on Wed Jan 12, 2011 6:39 am

I have a question about folder exclude patterns. Is this possible to set them for every project separately? I'm working with large projects including thousand of files. Some directories consists lots of binary files (for example images). Loading these files into project is completely unnecessary but increases project loading time.
--
Regards
elmer
elmer
 
Posts: 9
Joined: Wed Dec 29, 2010 7:58 am

Re: Sublime Text X 20110110

Postby jps on Wed Jan 12, 2011 7:01 am

It's not yet possible to set the folder exclude patterns individually for a project, but it will be in the future.
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20110110

Postby chewie54 on Wed Jan 12, 2011 2:32 pm

I usually use:
ant -f build.xml [target]
which searches for the build.xml in the directories above. Do I need to set the working directory in Sublime?

The examples below works and reports it can't find build.xml which is the expected response.
btw, I'm using ubuntu linux and I put the build file in ~/.Sublime Text X/Packages/User
thanks


jps wrote:You'll need to make a new .sublime-build file, which specifies ant. I'd imagine it'd look something like:

Code: Select all
{
"cmd": ["ant"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
}


.
chewie54
 
Posts: 6
Joined: Wed Jan 12, 2011 3:20 am

Re: Sublime Text X 20110110

Postby jps on Wed Jan 12, 2011 2:45 pm

You'll want to pass those extra arguments to ant, and specify the working directory then. They can be done something like:

Code: Select all
{
    "cmd": ["ant", "-f", "build.xml", "all"],
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "working_dir": "/home/foo/project"
}


For working_dir, you can also specify "$project_path" or "$file_path" to use the corresponding value.
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20110110

Postby oats on Wed Jan 12, 2011 5:58 pm

BTW - I am very impressed with your progress on X, particularly for OS X. Love using it now! One minor thing I've been missing on the OS X version. On Windows, when you choose to open or save a file, the file browser dialog will automatically start in the folder of the file currently being edited. This is not true for OS X however. So thankful for your responsiveness to the users on the forum!
oats
 
Posts: 101
Joined: Mon Nov 09, 2009 4:39 pm

Re: Sublime Text X 20110110

Postby reddshack on Wed Jan 12, 2011 6:58 pm

jps wrote:I'm planning on adding some API support for notifying plugins when focus is lost, and I'll add a save_on_focus_lost plugin at the same time. No ETA on this though.

Perfect, thanks!
reddshack
 
Posts: 20
Joined: Fri Jan 07, 2011 8:56 am

Re: Sublime Text X 20110110

Postby Tanaric on Thu Jan 13, 2011 8:25 pm

Nice update!

I don't get the little boxes drawn around all matching Ctrl+F find results in buffer anymore; is there a setting to re-enable this? Ubuntu 10.04, 64-bit.
Tanaric
 
Posts: 8
Joined: Fri Feb 05, 2010 11:46 pm

Re: Sublime Text X 20110110

Postby corelon on Thu Jan 13, 2011 8:26 pm

Just a quick question:
Is it possible to remove the empty checkbox from menu items that are not binary?

Regards,

Nick Tzanos
corelon
 
Posts: 41
Joined: Mon Feb 16, 2009 2:16 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: Esteban, pete340 and 16 guests