Sublime Forum

Dev Build 3084

#1

Dev Build 3084 is out now, with support for an additional syntax definition format, .sublime-syntax. Details at sublimetext.com/docs/3/syntax.html and Syntax Fun.

There are some menu items under Tools to either create a new .sublime-syntax file with a basic example, or create a new one using the tmLanguage file that’s being used for the current file as a basis. When converting files, you may want to take a look in the console for any warnings, which would indicate unsupported functionality.

A quick summary of the benefits of sublime-syntax files:

  • Ability to switch the context at the top of the stack, rather than just push/pop. Can also push multiple contexts on the stack at once, giving the ability to recognise any LL(1) grammar.
  • Easier to edit: compact YAML representation, and the prototype context can be used to reduce repetitious includes of things such as comments.
  • More robust inclusion of other syntax definitions. The tmLanguage format allows including another syntax definition (e.g., HTML including JavaScript), but isn’t well behaved in the face of syntax errors in the included code (e.g., see what happens if you have an unclosed string in embedded JavaScript). This is because any patterns modifying the included syntax (e.g., popping a context when is encountered) are only added to the root context. Using the with_prototype construct in sublime-syntax files, this issue can be avoided.

The plan in the near future is to update the existing tmLanguage files, convert them to sublime-syntax ones, and then put them on GitHub to accept patches. The primary reason the syntax testing functionality is in this build is to enable this.

The sublime-syntax is not set in stone, and may be changing over the next few builds.

1 Like

Sublime Syntax
#2

Hi. I have a problem with this update and it is the first time something like this happened to me. When I start Sublime Text, I get alert that new version of Sublime Text is available, but when I click on download button, new window appears with “No update available”. Weird… am i the only one getting this error? I’ve tried to download this update after restarting ST (may times), but it didn’t help. I am running ST on Windows 7 64-bit.

0 Likes

#3

Same here

0 Likes

#4

I’m not seeing any extra items under Tools.

In regards on the weird update popup, my colleague left Sublime running and a few minutes later it popped up to install.

0 Likes

#5

I’m in no way disputing what you are or are not seeing but I’m using Kubuntu 14.10 and Xubuntu 15.04 and I am seeing some new menu items under Tools. :question:

Platform/OS specific bug?

0 Likes

#6

Works fine for me on OSX.

0 Likes

#7

Not seeing extra items under Tools on Windows. I see a new build menu item for building with syntax tests, but that is all.

I do see them on OSX though. So I think this is platform specific.

0 Likes

#8

How can we handle the transition for the syntax file format in plugins ? If i put the tmLanguage and the sublime-syntax in the directory I now have two different syntax :-/

Loves the new format, it’s really a lot cleaner and easier to edit :smile: And the new option in Tools was available for me (windows 8.1)

0 Likes

#9

I am seeing the new items under tools as well.

Windows 7, 64bits
Build 3084, portable (I had to click “Check for updates” to upgrade)

@facelessuser
Can you provide more infos on windows?

0 Likes

#10

Apparently ST during update created a Main.sublime-menu in Packages/Default and that was overriding my built-in menu. Not sure why it did that, but removing that fixed the issue.

0 Likes

#11

I’m on OSX 10.10 FWIW, even after a restart of Sublime I couldn’t see it.

0 Likes

#12

Ok, updated on my MacBook and I can see the items.

0 Likes

#13

Can we please have middleclick or shift+click on Windows taskbar open a new window? I need this bad on windows 10 multiple desktops.

0 Likes

#14

I am getting the same issue on Windows 7 64 BIT OS. I am still at the previous version. I tried finding the Main.sublime-menu (as was suggested by facelessuser) but it does not exist . Clearing the backup and the session does not help either.

Please help.


Thanks and Regards
Gagan

0 Likes

#15

If you aren’t seeing the new menu items then it’s most likely that you have another Main.sublime-menu overriding the default one: check via the Preferences/Browse Packages menu item.

Currently there’s one shipped .sublime-syntax file, in YAML/YAML.sublime-syntax. The old YAML.tmLanguage is still there, but I’ve added:

<key>hidden</key>
<true/>

to the top, so it won’t show up in the Syntax menu. Keeping it around has two advantages:

  • Any other tmLanguage files including YAML.tmLanguage will still work.
  • Any users updating with an already open YAML file will have things continue to work as expected (the syntax file to use is determined once when a file is opened, and won’t be recalculated until the file is closed and reopened again).
0 Likes

#16

If the auto update isn’t showing a new version, then it sounds like an HTTP proxy is caching something between you and the server. To work around this, just download the new version manually from sublimetext.com/3dev (and hit refresh in your browser if it’s not showing 3084).

0 Likes

#17

This is what I did and I was able to update it manually (so I guess it might be a HTTP caching issue)

thanks you sir.

With Regards
gagan

0 Likes

#18

[quote=“jps”]If you aren’t seeing the new menu items then it’s most likely that you have another Main.sublime-menu overriding the default one: check via the Preferences/Browse Packages menu item.
[/quote]

Thanks Jon!

0 Likes

#19

Which will take precedence if you have a .sublime-syntax file and a .tmLanguage file for the same language?

0 Likes

#20

This is a good question; I would also like to know.

0 Likes