Home Download Buy Blog Forum Support

Sublime Text X 20101022

Sublime Text X 20101022

Postby jps on Fri Oct 22, 2010 6:55 am

Sublime Text X 20101022 is available now, with support for Python plugins. With this comes several important commands that depended on Python, such as Ctrl+D, Ctrl+Backspace, swap lines, etc.

Existing plugins for Sublime Text will not work with X, as the API is different. A quick summary of the changes:
- Naming convention has changed to conform to PEP 8.
- Arguments are passed to commands by keyword.
- Functions that modify the state of the buffer (insert, erase, replace) take an 'Edit' object as an argument. This enables better support for controlling undo groups (and macros+repeat by association). TextCommands get an Edit object passed to their run function, other plugins may create one as needed by using view.begin_edit(). It's important that references to Edit objects are not kept around: there should be no references left to any Edit object when a command finishes.
- Events (on_load() etc) are only delivered to classes that inherit from sublime_plugin.EventListener. Commands no longer receive these events.

Not all functions present in the Sublime Text API have made their way into Sublime Text X yet. Notably, the Window object only responds to run_command() at the moment. There's also no console yet. I wouldn't recommend putting too much effort into playing around with plugins until these are implemented.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20101022

Postby jps on Fri Oct 22, 2010 7:48 am

Console will likely be in next week.

The undo system expects undo groups to be finished when a command is, so I don't think that will be appearing. However, undo groups created by the same command will be merged if they're done within a short time frame, and there are no other intervening commands. e.g., try moving a line down several times in a row, then hitting undo.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20101022

Postby jps on Fri Oct 22, 2010 11:14 am

Also, re: Python UCS2 vs. UCS4 on Linux, there are still only UCS4 builds available. I installed a copy of Fedora this week to make a UCS2 build, only to realise at the end that it's also a UCS4 distro. Perhaps next week!
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text X 20101022

Postby dan1el on Fri Oct 22, 2010 2:36 pm

I've been following the development of Sublime Text X closely ever since it was announced. I was wondering when non-paying users will have a go at it? For the time being, I cannot afford a licence (poor student :geek:) so I'm very curious. Or maybe you (jps) could provide some screenshots? That would have been great :-)
dan1el
 
Posts: 2
Joined: Sat Mar 06, 2010 1:21 am

Re: Sublime Text X 20101022

Postby oxman on Fri Oct 22, 2010 7:00 pm

Damned... So next week for ucs2.
Thanks for you work :)
oxman
 
Posts: 66
Joined: Sun Aug 29, 2010 10:00 am

Re: Sublime Text X 20101022

Postby corelon on Sat Oct 23, 2010 12:28 pm

jps wrote:Also, re: Python UCS2 vs. UCS4 on Linux, there are still only UCS4 builds available. I installed a copy of Fedora this week to make a UCS2 build, only to realise at the end that it's also a UCS4 distro. Perhaps next week!


I should have mentioned that when I first told you about the UCS2/UCS4 issue. I also tried a Fedora VM and it worked. I think Arch Linux use UCS2 python and maybe oxman can mention the distro that he uses.

Waiting for next week's release to see if the non-working keys problem on my work linux gets sorted.

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

Re: Sublime Text X 20101022

Postby marksteve on Sat Oct 23, 2010 3:18 pm

Awesome update. Good to see selection functions working already.

I do get a lot of funny behaviours when moving lines such as buffer not updating and random crashes.
I'm also experiencing the non-working keys problem with my ubuntu vbox.
marksteve
 
Posts: 43
Joined: Thu Sep 30, 2010 6:44 am

Re: Sublime Text X 20101022

Postby oxman on Sun Oct 24, 2010 8:30 am

I using Archlinux ;)

Edit : Well know on Archlinux the default version of python is python3 :')
Edit : So a new problem with SublimeTextX :)
oxman
 
Posts: 66
Joined: Sun Aug 29, 2010 10:00 am

Re: Sublime Text X 20101022

Postby corelon on Sun Oct 24, 2010 10:40 am

It amazes me that on Arch the put Python 3 as the default version. There are many widely used libraries and frameworks not yet ported to python3 that normally should prevent it from being the default. But still, although I really have no clue about the internals of Sublime, it could be an option if it does not break many things. On the other end, from a discussion I had with a friend that supports interfaces for all sorts of scripting languages for the NLP platform he maintains (Ellogon) he tells me that it is a nightmare everytime the language goes up a minor version to have to recompile everything related and test again to make sure it works. So I guess supporting a major version, which in this case it is almost as major of a change as VB.NET was to VB I am not sure it would be wise for the immediate future until the product is stable.

My two cents,

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

Re: Sublime Text X 20101022

Postby oxman on Sun Oct 24, 2010 6:16 pm

Maybe make Sublime static linked ?!
oxman
 
Posts: 66
Joined: Sun Aug 29, 2010 10:00 am

Next

Return to General Discussion

Who is online

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