Sublime Forum

20100430 Beta

#1

20100430 is out now. The replace panel bug where tab wasn’t working until the mouse was used in fixed.

Also new in this beta is the onQueryContext API, for plugins to expose key binding contexts. For example:

class NumberContext(sublimeplugin.Plugin):
	def onQueryContext(self, view, key, value):
		if key == "isNumber":
			isNumber = True
			for s in view.sel():
				char = view.substr(s.begin())
				if char < '0' or char > '9':
					isNumber = False
			
			return isNumber == (value == "true")

This plugin defines a new key binding context, “isNumber”, that allows key bindings that only trigger if the cursor in next to a number. The corresponding key binding would look like:

<binding key="ctrl+t" command="whatever">
	<context name="isNumber" value="true"/>
</binding>

EDIT: Also, memory usage is substantially improved with many files are open. Startup speed is better due to better IO scheduling, and the CPU time required for startup has also been reduced.

0 Likes

#2

Awesome. That tab bug was quite annoying. Thanks for the update.

0 Likes

#3

Hey you packaged up a portable version too - you kept quiet about that :smiley:

Excellent stuff

Just off to download it now to add it to my Dropbox

Cheers,
Mick

0 Likes

#4

Awesome. Off to download :smile:

Edan

0 Likes

#5

Major problem:
Ctrl+r (find symbol in file) crashes the new version when run in an html file.

I tried several different files, and even a minimal html file which only has a head section will cause the crash. (An empty file won’t cause a crash).
The previous beta version doesn’t have this problem.

Hope this gets solved soon!

0 Likes

#6

[quote=“edanm”]Major problem:
Ctrl+r (find symbol in file) crashes the new version when run in an html file.[/quote]

Confirmed.

0 Likes

#7

20100501 is up now which fixes this bug.

0 Likes

#8

Pressing escape doesn’t close the find panels because the context “isPanelVisible” doesn’t work anymore

EDIT: it works when inside the find panel, but not when inside the editor pane

0 Likes

#9

20100501 is updated with a fix now

0 Likes

#10

Works for me.
Thanks!

0 Likes