Home Download Buy Blog Forum Support

20090530 Beta

20090530 Beta

Postby jps on Sat May 30, 2009 2:12 pm

This is mostly a fairly minor update, just a handful of bug fixes I wanted to get out there. Notably though, it does have the much-requested auto complete support in the API.

Auto complete itself is now implemented via a plugin, and you can choose to either hook into that, or show a separate completions menu (via the new method view.showCompletions).

A short example of hooking into the existing auto complete command:

Code: Select all
from AutoComplete import AutoCompleteCommand

def AddGreeting(view, pos, prefix, completions):
   return ["Hello!"] + completions
   
AutoCompleteCommand.completionCallbacks['AddGreeting'] = AddGreeting


This will add "Hello!" as the first available auto complete suggestion.
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20090530 Beta

Postby EJ12N on Sun May 31, 2009 4:11 am

Freaking awesome! Thanks Jon :)
Can you elaborate on bug fixes in this release?
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: 20090530 Beta

Postby jps on Sun May 31, 2009 5:14 am

EJ12N wrote:Can you elaborate on bug fixes in this release?


They're listed in the changelog at http://www.sublimetext.com/beta: the last 4 items mentioned are bug fixes.
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

Re: 20090530 Beta

Postby EJ12N on Sun May 31, 2009 3:49 pm

jps wrote:
EJ12N wrote:Can you elaborate on bug fixes in this release?


They're listed in the changelog at http://www.sublimetext.com/beta: the last 4 items mentioned are bug fixes.


Nice, my bad I forgot to check that page, I was on the phone when posting that :/

Really looking forward to
The next version of Sublime Text will have a findAll() method in the API, so removing all whitespace using the above functions won't be so roundabout
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: 20090530 Beta

Postby tgkeul on Sun May 31, 2009 6:18 pm

The changed autocompletion makes me happy as you removed the dependecy on trailing punctuation. This was sometimes annoying when programming PL/SQL.
Many thanks
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm

Re: 20090530 Beta

Postby EJ12N on Tue Jun 02, 2009 3:27 pm

sublimator wrote:Any chance to get a callback API for the autocomplete widget?

Useful for example to insert automatically generated inline snippets from CTags symbols.

Code: Select all
cleared   .\fixtures.py   /^def cleared(fixtures=None, drop_create=False):$/;"   f


Code: Select all
cleared(${0:fixtures=None}, ${1:drop_create=False})$15


Or maybe we are just better off creating sublime-snippet files automatically from CTags definitions using `x,x,x,x,tab` handlers? This would allow us to tweak them.

Thoughts people?

I'm actually leaning towards the latter, in which case we wouldn't really need a callback API would we.

either way you do it, make it optional. In a really LARGE project I wouldn't want a bunch of sublime-snippets files reflecting all the ctags from that project, it would easily get to the 10k snippet files in a sec lol...
On the other hand I would like for the ctags to pop down and show me all the definitions and allow me to select whichever :)

Now, if youre thinking of doing insertInlineSnippet when selecting the definition (function) from the drop down then I don't see a problem why not have the snippet dynamically generated for you. (without creating sublime-snippet files tho)
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 10 guests