Sublime Forum

Sublime Text X 20101022

#1

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.

0 Likes

#2

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.

0 Likes

#3

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!

0 Likes

#4

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 :smile:

0 Likes

#5

Damned… So next week for ucs2.
Thanks for you work :smile:

0 Likes

#6

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

0 Likes

#7

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.

0 Likes

#8

I using Archlinux :wink:

Edit : Well know on Archlinux the default version of python is python3 :’)
Edit : So a new problem with SublimeTextX :smile:

0 Likes

#9

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

0 Likes

#10

Maybe make Sublime static linked ?!

0 Likes

#11

how can i get a key to try out sublime text x??

0 Likes

#12

buy it :smiley:

0 Likes

#13

Running on a company-tweaked version of Ubuntu – the nonworking keys problem appears to only happen when NumLock is on. Turning numlock off causes the nonworking keys to function again.

0 Likes

#14

Haven’t tried it out yet, but sounds like this numlock and capslock issue is resolved in the latest alpha version of X 20101118!

0 Likes

#15

@jps: Are the new major releases of Sublime Text (such as 2.0, 3.0, 4.0 etc.) going to be free for registered users or we’ll need to pay? Thanks.

0 Likes

#16

I’m pretty dang sure Jon isn’t going to charge users again who have already paid. I don’t think you need to worry, and you get to try out 2.0 alpha unlike unlicensed users :wink:

0 Likes