TextMate bundle, auto-complete and tooltips.

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

TextMate bundle, auto-complete and tooltips.

Post by ljdp »

For those of you who use TextMate I've edited an existing bundle to include auto-completions for all the functions.
Press the § key (below esc on mac keyboards) and a list of suggestions pop up. Press enter and it'll update and show a tool-tip.
You can also press tab to jump between each argument.

I've added all the functions to the list from the wiki, but not every functions has a tooltip and arguments yet,
if anyone wants to help finish this tedious task the completion list is stored in LOVE.tmbundle/support/completions.rb
it's a ruby hash table but it's pretty self explanatory to edit. Just fork and send a pull request.

Image
Image

Get it here:
http://github.com/perky/love2d-textmate-bundle
User avatar
kalle2990
Party member
Posts: 245
Joined: Sat Sep 12, 2009 1:17 pm
Location: Sweden

Re: TextMate bundle, auto-complete and tooltips.

Post by kalle2990 »

Looks epic to me, too bad I run Notepad++ on Windows.. :cry:
User avatar
willurd
Citizen
Posts: 76
Joined: Thu Mar 04, 2010 1:04 am
Contact:

Re: TextMate bundle, auto-complete and tooltips.

Post by willurd »

This is so awesome. Thanks a bunch!
dotoli
Prole
Posts: 2
Joined: Sun Feb 28, 2010 9:58 pm

Re: TextMate bundle, auto-complete and tooltips.

Post by dotoli »

Thank you so much for this!

Makes working with LÖVE even more fun!
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: TextMate bundle, auto-complete and tooltips.

Post by ljdp »

Want completion for functions throughout your project?
With class inheritance?

Watch me.
http://www.vimeo.com/10319082

In regards to class inheritance it looks for the statement

Code: Select all

newclass = class( "classname", parentclass )
which is what MiddleClass uses, if your OO system uses a different function you'll
have to change some regexp (or simply change your function :P)

Github updated up top.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: TextMate bundle, auto-complete and tooltips.

Post by bartbes »

In your video a saw class:new being recognized, is it always, or did you do some magic in another file? (in the latter case, please add the :new syntax)
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: TextMate bundle, auto-complete and tooltips.

Post by ljdp »

It's dynamic.
Any function you write will show up.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: TextMate bundle, auto-complete and tooltips.

Post by bartbes »

I meant that the result of class:new was recognized as a subclass.
User avatar
ljdp
Party member
Posts: 209
Joined: Sat Jan 03, 2009 1:04 pm
Contact:

Re: TextMate bundle, auto-complete and tooltips.

Post by ljdp »

Ahh, not at the moment.
But you can do that easily with a comment

Code: Select all

-- subclass = superclass
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: TextMate bundle, auto-complete and tooltips.

Post by nevon »

Aw man, I wish I had something like this for Geany. That would be so slick.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 91 guests