Sublime Forum

20090608 Beta

#1

20090608 is out, with the notable feature being experimental support for loading tmSnippet files. They should be fully supported, with the exception that interpolated shell code (requiring a unix style shell be available) is ignored. Tab triggers get converted into key bindings on the fly, but ‘key equivalents’ defined in .tmSnippet files are ignored.

*.sublime-snippet files are still supported, and use the same syntax within the tag (with the exception that $0 is treated as the first field, rather than the last). I expect that the format of .sublime-snippet files will change in the future, when python code is able to be embedded in them.

I’m keen to hear about any issues that are found with the new snippet support.

Also in 20090608, auto complete may be given commands as available completions (and thus inline snippets etc). Part of this involved some spring cleaning on how commands are handled within Sublime, so I’m also keen to hear about any issues with menus, keybindings etc not working as they used to.

0 Likes

#2

You can mix and match the completions: ‘somecomplete’, (‘another’, ‘insertInlineSnippet’)] will work fine. You’ll likely want to make sure of the new function sublime.makeCommand when assembling the commands to place into the auto complete lists.

0 Likes

#3

Could you expand on this? I’m not quite sure what you mean.

re: auto complete fonts, it’s not configurable within the editor, you’d have to change your system wide menu font. The auto complete widget will eventually be replaced, and it’ll use the same font as the text buffer that that point.

0 Likes

#4

Very nice update :smiley:
I will play with tmSnippets file and report back.

I will release some screencasts soon, I have to install camtasia on this new computer @ work :slight_smile: but no biggies
and I am preparing a sublime-package with some cool snippets and macros for people… some good stuff happening in sublime text world :smiley:

0 Likes

#5

There is a bug in 20090608 that causes an extra tab stop to be inserted of sorts: auto quotes shouldn’t be causing any issues. It’ll be fixed in the next beta.

0 Likes

#6

:confused: Please give me a hint. My snippets don’t work anymore. I can start them and fill $1 but when pressing TAB to jump to $2 sublime will just insert a \t.

Key definiton in my plsql package

  <binding key="c,u,r,tab" command="insertSnippet 'Packages/PLSQL/New Cursor.sublime-snippet'">
    <context name="selector" value="source.plsql"/>
  </binding>

Key definitions related to TAB in my User\Default.sublime-keymap

	<binding key="tab" command="insertAndDecodeCharacters \t"/>
	<binding key="tab" command="indent">
		<context name="newlineInSelection" value="true"/>
	</binding>
	<binding key="tab" command="nextInSelectionHistory">
		<context name="canUnpopSelection" value="true"/>
	</binding>

The snippet

<snippet>
    <content><![CDATA[
/**
 * ${1:cursor_name}
 *
 * @param ${2:param_name}
 */
cursor $1
 ($2 in ${3:param_type})
is
  select $4
    from
   where = $2;
]]></content>
</snippet>
0 Likes

#7

Key bindings to move through the tab stops have been changed, instead of nextInSelectionHistory/prevInSelectionHistory, you’ll now want nextField and prevField:

	<binding key="tab" command="nextField">
		<context name="hasNextField" value="true"/>
	</binding>
	<binding key="shift+tab" command="prevField">
		<context name="hasPrevField" value="true"/>
	</binding>

Note to everyone else: Default.sublime-keymap already includes these changes, this will only effect you if you’re overwriting the default version after installing.

0 Likes