Home Download Buy Blog Forum Support

20090608 Beta

20090608 Beta

Postby jps on Mon Jun 08, 2009 2:09 am

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 <contents> 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.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20090608 Beta

Postby jps on Mon Jun 08, 2009 2:32 am

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.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20090608 Beta

Postby jps on Mon Jun 08, 2009 6:29 am

sublimator wrote:The merged tabstop history is pretty cool :) It would be good if there was a way to get back to normal tab mode with one keystroke though.


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.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20090608 Beta

Postby EJ12N on Mon Jun 08, 2009 3:20 pm

Very nice update :D
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 ^_^ 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 :D
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: 20090608 Beta

Postby jps on Tue Jun 09, 2009 1:13 pm

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.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20090608 Beta

Postby tgkeul on Tue Jun 09, 2009 7:44 pm

:? 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
Code: Select all
  <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
Code: Select all
   <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
Code: Select all
<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>
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm

Re: 20090608 Beta

Postby jps on Tue Jun 09, 2009 10:21 pm

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

Code: Select all
   <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.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 22 guests