SublimeText plugin for Love

General discussion about LÖVE, Lua, game development, puns, and unicorns.
minism
Prole
Posts: 20
Joined: Tue Nov 01, 2011 5:32 am

SublimeText plugin for Love

Post by minism » Wed Nov 09, 2011 2:46 am

Hey guys,

I just uploaded my plugin for SublimeText2, featuring syntax highlighting, auto completion, and a run command for Love.

https://github.com/minism/SublimeLove

Pretty basic stuff so far. And there are some issues, mainly with autocompletion -- periods sort of get in the way. You'll see what I mean. They are currently being worked on in the core editor, though, so hopefully it will be improving soon.

If you haven't used SublimeText2 (http://www.sublimetext.com/2) its pretty awesome -- fast and lightweight editor with a fuzzy-search indexing system, and heavily extensible with Python. It even has vim mode, so I don't wanna hear it. You know who you are.

More updates soon.

MaxGhost
Prole
Posts: 2
Joined: Tue Nov 08, 2011 6:41 am

Re: SublimeText plugin for Love

Post by MaxGhost » Wed Nov 09, 2011 4:04 am

Yay! :)

Thanks for the great work.

Alternative to using a PATH var would be to just replace the "love" command to the direct file path to love.exe (for the lazies or newbies).

User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: SublimeText plugin for Love

Post by TechnoCat » Wed Nov 09, 2011 4:09 am

Could I recommend trying to put more commonly used completions towards the top?
for instance I typed "getPos' and hit ctrl+space to be presented with love.audio.getPosition and then love.mouse.getPosition.

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: SublimeText plugin for Love

Post by coffee » Wed Nov 09, 2011 3:23 pm

Thank you, nice work. Already installed and using it. For now is working ok. It's already nice see Love syntax be high-lightned too. I will give better feedback later.

BTW/Off-topic - There isn't for now a category for LOVE snippets but anyway I advise you install Snipstatic. (https://github.com/bobthecow/sublime-sniptastic) It adds a nice pop-up menu with only the snippets used in the coding language being used.

Socapex
Prole
Posts: 2
Joined: Tue May 01, 2012 11:46 pm

Re: SublimeText plugin for Love

Post by Socapex » Wed May 02, 2012 2:48 am

Just realised there was code completion for Love in Sublime... THANK YOU!!! (intentional scream :) )

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: SublimeText plugin for Love

Post by coffee » Wed May 09, 2012 11:57 am

Hello minism, thanks again for you lovely package for Sublime Text.

I'd like to know if Lua/Lua's Love block comment is working well with lovers that are using Sublime Text. I noticed that default Lua package in Sublime Text don't offer block comment and instead single comment every line when block comment was invoked (either by menu or shortcut).

Well, if isn't a problem of mine or in OSX version it's strange that never was correctly implemented, probably not a lot of people use ST for do Lua. So for a quick fix I altered Lua's Comments.tmPreferences adding:

Code: Select all

			<dict>
				<key>name</key>
				<string>TM_COMMENT_START_2</string>
				<key>value</key>
				<string>--[[</string>
			</dict>
			<dict>
				<key>name</key>
				<string>TM_COMMENT_END_2</string>
				<key>value</key>
				<string>--]]</string>
			</dict>
and block comment works better. But since Lua package is a base one, that settings will be probably erased with new updates.

Minism if this is actually a base Lua package problem could you please add a way of override Lua comments settings in LOVE package?

User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: SublimeText plugin for Love

Post by TechnoCat » Wed May 09, 2012 2:25 pm

Lots of people use SublimeText and Lua it seems here.
I haven't had a problem with block comments, but I have problems with the base Lua and elseif statements. It never unindents them correctly!

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: SublimeText plugin for Love

Post by Robin » Wed May 09, 2012 3:04 pm

Note that the comment ends with ]] not --]].

Also, maybe you could add --[=[ ]=], --[==[ ]==], etc.
Help us help you: attach a .love.

User avatar
Charles Randall
Prole
Posts: 34
Joined: Wed May 09, 2012 2:52 pm

Re: SublimeText plugin for Love

Post by Charles Randall » Wed May 09, 2012 3:04 pm

Hey, so, before seeing this I ended up making my own plugin for Sublime Text 2 with two purposes in mind:

1) To create new love2d projects simply and easily
2) To add robust build rules.

https://github.com/mrcharles/sublove2d

There's minimal overlap in functionality here, maybe we can merge the various parts?

Anyway, mine doesn't require love.exe to be in your project directory, you can leave it wherever you'd like, and you just set some settings in your user preferences, and the build commands will properly reference it from whereever.

Another thing I added was the ability to specify two different build rules, so that you can have a dynamically linked dll jit version of love2d in order to use it with Decoda.

I wanted to automatically launch decoda from Sublime Text 2, but decoda doesn't have very good command line support. So I'm going to go bug the Decoda guy in the Decoda thread.

User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: SublimeText plugin for Love

Post by TechnoCat » Wed May 09, 2012 3:06 pm

Charles Randall wrote:Hey, so, before seeing this I ended up making my own plugin for Sublime Text 2 with two purposes in mind:

1) To create new love2d projects simply and easily
2) To add robust build rules.

https://github.com/mrcharles/sublove2d
You should add it to the ST2 package manager.
http://wbond.net/sublime_packages/package_control

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests