Home Download Buy Blog Forum Support

Dev Build 3013

Dev Build 3013

Postby jps on Thu Feb 21, 2013 1:45 am

Build 3013 is available now. This is the first dev build for Sublime Text 3, so you won't get an auto update notification from previous builds.

3013 has atomic saves, where the file is first saved to a new file, and then renamed over the top of the existing file. Atomic saves are disabled by default, but can be enabled via the atomic_save setting.

There are a bunch of new APIs in 3013, notably on_text_command an on_window_command. These events allow plugins to be notified before a given command is run. Plugins can use them as simple notifications, or they can change the command that will be run: if, instead of returning None, an event handler returns a command name or a (command_name, args) tuple, then the returned command will be run instead of the originally issued one.

It's easy to get into trouble with on_text_command, so do be careful. If, for example, you make a plugin that unilaterally returns "paste" from on_text_command, then every command issued will be a paste command, making things like undo, editing, navigation, etc not work. You'd have to manually delete the plugin to get things make to a working state.

The API reference has been updated with all the new APIs in S3: http://www.sublimetext.com/docs/3/api_reference.html

On OS X, experimental support has been added for handling line numbers passed through the byzantine apple events system. If you are using Unity 3D, please let me know if this is working for you.
Site Admin
Posts: 3216
Joined: Wed Mar 19, 2008 12:33 pm

Re: Dev Build 3013

Postby facelessuser on Thu Feb 21, 2013 2:13 am

Resource api is nice. Thanks!
Posts: 1733
Joined: Tue Apr 05, 2011 7:38 pm

Re: Dev Build 3013

Postby PIAOYIDIAN on Thu Feb 21, 2013 2:46 am

Sublime Text Build 3013.png
Sublime Text Build 3013.png (89.7 KiB) Viewed 6595 times
Sublime Text Build 3013 is great.
Posts: 39
Joined: Sun Dec 25, 2011 5:19 am

Re: Dev Build 3013

Postby FragOnly on Thu Feb 21, 2013 3:07 am

I really like the resource apis!

the following command does not seem to be working, i looked in the sublime.py file for it and could not find a match.
sublime.find_resources(pattern) [String] Finds resources whose file name matches the given pattern.

Here is how I am using it in code:
Code: Select all
result = sublime.find_resources("*.sublime-commands")

The error code is:
Code: Select all
AttributeError: 'module' object has no attribute 'find_resources'
Posts: 19
Joined: Sat Feb 09, 2013 12:50 pm

Re: Dev Build 3013

Postby sublimator on Thu Feb 21, 2013 3:31 am

Yeah, find_resources is missing for me too
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
Posts: 650
Joined: Thu Mar 20, 2008 5:41 am

Re: Dev Build 3013

Postby jps on Thu Feb 21, 2013 4:51 am

It looks like one of the changes to sublime.py didn't make it in, so find_resources isn't currently exposed. I'll fix this for the next build. In the mean time, you can use the hacky version:

Code: Select all
Site Admin
Posts: 3216
Joined: Wed Mar 19, 2008 12:33 pm

Re: Dev Build 3013

Postby figbash on Thu Feb 21, 2013 7:07 am

Hey, I'm using Unity 3D 4.0 on OS X Mountain Lion, if it's supposed to jump to the line number from double clicking console entries then that's not working. Is there something else you wanted to check with Unity?
Posts: 14
Joined: Fri Jul 29, 2011 8:36 pm

Re: Dev Build 3013

Postby figbash on Thu Feb 21, 2013 7:14 am

Is there any chance you could include a better default C# package? The one it comes with doesn't do Goto Symbol correctly, and the new Goto Definition doesn't seem to work either, probably for the same reason. I'm using this one https://github.com/wintermi/csharp-tmbundle if that helps!
Posts: 14
Joined: Fri Jul 29, 2011 8:36 pm

Re: Dev Build 3013

Postby quarnster on Thu Feb 21, 2013 1:25 pm

Don't know whether the root cause is ST3 or GoSublime, but disabling GoSublime makes the issue go away, although I'd have expected ST3 to not freeze due to a plugin's behavior now with plugin_host.

How to reproduce:
1. Open up lots of go files.
2. Have GoSublime enabled
3. Menu item File->Close All Files
4. ST3 hangs forever.

The only way to regain control is to issue `killall plugin_host` and then after a few seconds ST3 unfreezes (but then without any plugins running). The freeze always happen with GoSublime enabled and never happens when it's disabled.

ST3 3013 (although happened with 3011 (never upgraded to 3012) too so isn't specific to this version)
OSX 10.8.2
GoSublime r13.02.08-2

The GoSublime error log is empty.

Also reported as a GoSublime github issue
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: Dev Build 3013

Postby fjl on Fri Feb 22, 2013 2:22 am

Thank you for on_text_command and on_window_command!

A minor nitpick:
The callbacks are not called for commands that are run from a Macro File.
Those are also not logged.
This would be helpful to track all actual invocations of a command.
Posts: 36
Joined: Wed Dec 28, 2011 12:41 am


Return to General Discussion

Who is online

Users browsing this forum: alecrust, jps and 20 guests