Page 1 of 3

SublimeText plugin for Love

Posted: Wed Nov 09, 2011 2:46 am
by minism
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.

Re: SublimeText plugin for Love

Posted: Wed Nov 09, 2011 4:04 am
by MaxGhost
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).

Re: SublimeText plugin for Love

Posted: Wed Nov 09, 2011 4:09 am
by TechnoCat
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.

Re: SublimeText plugin for Love

Posted: Wed Nov 09, 2011 3:23 pm
by coffee
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.

Re: SublimeText plugin for Love

Posted: Wed May 02, 2012 2:48 am
by Socapex
Just realised there was code completion for Love in Sublime... THANK YOU!!! (intentional scream :) )

Re: SublimeText plugin for Love

Posted: Wed May 09, 2012 11:57 am
by coffee
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?

Re: SublimeText plugin for Love

Posted: Wed May 09, 2012 2:25 pm
by TechnoCat
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!

Re: SublimeText plugin for Love

Posted: Wed May 09, 2012 3:04 pm
by Robin
Note that the comment ends with ]] not --]].

Also, maybe you could add --[=[ ]=], --[==[ ]==], etc.

Re: SublimeText plugin for Love

Posted: Wed May 09, 2012 3:04 pm
by Charles Randall
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.

Re: SublimeText plugin for Love

Posted: Wed May 09, 2012 3:06 pm
by TechnoCat
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