Using SciTE with LÖVE

General discussion about LÖVE, Lua, game development, puns, and unicorns.
giniu
Party member
Posts: 221
Joined: Mon Nov 30, 2009 4:44 pm

Re: Using SciTE with LÖVE

Post by giniu »

I wonder, why change the way all .lua files are handled? How about adding:

Code: Select all

command.name.1.main.lua=Run in Love
command.1.main.lua=love $(FileDir)
which adds new tool option just below "Go" with "Run in Love" that works for main.lua? Was there specific reason to overwrite defaults? :) I just found that thread (quite old thread already) when I was looking to see how others here use SciTe (if they use it). For example I have additional 3 commands:

Code: Select all

command.name.1.main.lua=Run in Love 0.5.0
command.1.main.lua=love-05 $(FileDir)
command.name.2.main.lua=Run in Love 0.6.2
command.2.main.lua=love $(FileDir)
command.name.3.main.lua=Run in Love Hg
command.3.main.lua=love-hg $(FileDir)
and it works quite OK, while I can still edit and run other, non-löve lua files easily :)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Using SciTE with LÖVE

Post by Robin »

giniu wrote:Was there specific reason to overwrite defaults? :)
Short cut.

I barely use SciTE anymore. Mostly vim nowadays. It's addicting. :P
Help us help you: attach a .love.
User avatar
zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Location: In your head.
Contact:

Re: Using SciTE with LÖVE

Post by zac352 »

I'm surprised these windows users didn't realise that installing love doesn't create a batch command named love... Or does it? No, it does not.
But anyway,

Code: Select all

command.go.main.lua="path\to\love.exe" "$(FileDir)"
I once tried using batch with forward slashes in the paths. I couldn't find the error for several minutes. :P
Hello, I am not dead.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Using SciTE with LÖVE

Post by kikito »

Adding the love executable dir to the PATH variable is easier.
When I write def I mean function.
hide
Prole
Posts: 7
Joined: Thu Jan 14, 2010 11:17 pm

Re: Using SciTE with LÖVE

Post by hide »

I'm back and kicking some syntax coloration this time.
It's certainly not the best way to do it but I get nice colors so i'm happy :P

Put that in your lua.properties :

Code: Select all

# LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE
keywordclass7.lua5=love.audio love.event love.filesystem love.font love.graphics love.image \
love.joystick love.keyboard love.mouse love.physics love.sound love.thread love.timer \
love.audio.getNumSources love.audio.getOrientation love.audio.getPosition love.audio.getVelocity \
love.audio.getVolume love.audio.newSource love.audio.pause love.audio.play love.audio.resume love.audio.rewind \
love.audio.setOrientation love.audio.setPosition love.audio.setVelocity love.audio.setVolume love.audio.stop \
love.event.poll love.event.pump love.event.push love.event.wait \
love.font.newFontData love.font.newGlyphData love.font.newRasterizer \
love.graphics.checkMode love.graphics.circle love.graphics.clear love.graphics.draw love.graphics.drawq \
love.graphics.getBackgroundColor love.graphics.getBlendMode love.graphics.getCaption love.graphics.getColor \
love.graphics.getColorMode love.graphics.getFont love.graphics.getHeight love.graphics.getLineStipple love.graphics.getLineStyle \
love.graphics.getLineWidth love.graphics.getMaxPointSize love.graphics.getModes love.graphics.getPointSize love.graphics.getPointStyle \
love.graphics.getScissor love.graphics.getWidth love.graphics.isCreated love.graphics.line love.graphics.newFont love.graphics.newFramebuffer \
love.graphics.newImage love.graphics.newImageFont love.graphics.newParticleSystem love.graphics.newQuad love.graphics.newScreenshot \
love.graphics.newSpriteBatch love.graphics.point love.graphics.polygon love.graphics.pop love.graphics.present love.graphics.print \
love.graphics.printf love.graphics.push love.graphics.rectangle love.graphics.reset love.graphics.rotate \
love.graphics.scale love.graphics.setBackgroundColor love.graphics.setBlendMode love.graphics.setCaption \
love.graphics.setColor love.graphics.setColorMode love.graphics.setFont love.graphics.setIcon love.graphics.setLine \
love.graphics.setLineStipple love.graphics.setLineStyle love.graphics.setLineWidth love.graphics.setMode \
love.graphics.setPoint love.graphics.setPointSize love.graphics.setPointStyle love.graphics.setRenderTarget \
love.graphics.setScissor love.graphics.toggleFullscreen love.graphics.translate love.graphics.triangle \
love.image.newEncodedImageData love.image.newImageData \
love.joystick.close love.joystick.getAxes love.joystick.getAxis love.joystick.getBall love.joystick.getHat \
love.joystick.getName love.joystick.getNumAxes love.joystick.getNumBalls love.joystick.getNumButtons \
love.joystick.getNumHats love.joystick.getNumJoysticks love.joystick.isDown love.joystick.isOpen love.joystick.open \
love.keyboard.getKeyRepeat love.keyboard.isDown love.keyboard.setKeyRepeat \
love.mouse.getPosition love.mouse.getX love.mouse.getY love.mouse.isDown love.mouse.isGrabbed \
love.mouse.isVisible love.mouse.setGrab love.mouse.setPosition love.mouse.setVisible
# LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE

# LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE
keywords6.$(file.patterns.lua)=$(keywordclass7.lua5)
# LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE LOVE
Done, LOVE function are now blue :ultrashocked:

I still haven't found a way to color the function red instead of blue. Can someone help here ?
I've tried using "keywords27" and making my own color but without success :/
by Jasoco : Löve is cross-platform after all.
hide
Prole
Posts: 7
Joined: Thu Jan 14, 2010 11:17 pm

Re: Using SciTE with LÖVE

Post by hide »

On a side note, and for those like me who don't always use the search function, Notepad++ can launch LOVE code too.
Go in Run=>Run...
Find your love.exe, quote it, and add the current directory var from notepad++ on the end like that :
"c:\your\path\to\love.exe" "$(CURRENT_DIRECTORY)"
And there is auto-completion (with prototype) but i haven't found how to havethe functions colored. :c
by Jasoco : Löve is cross-platform after all.
User avatar
Uhfgood
Prole
Posts: 35
Joined: Sat Jul 28, 2012 10:04 pm
Location: Oregon, US
Contact:

Re: Using SciTE with LÖVE

Post by Uhfgood »

I realize it's been a long time since this thread has been active, but I've only been using Love a few months, and I like the fact that sciTE will run my love projects. But there is an annoying little thing and that is I always have to switch to the main.lua tab before running my program. Does anyone know of a way to tell it to run love with main.lua no matter what file is in focus?

Code: Select all

command.go.main.lua="C:\Program Files (x86)\LOVE\love.exe" "$(FileDir)"
-- is what makes it run love at all so I'm thinking I could do something in here that just grabs main.lua just as long as the currently selected file is in the same folder (maybe command.go.main.lua could be switched back to command.go.*.lua and then in "$(FileDir)\main.lua" maybe?

And I just tried that and that didn't work, so I'm not sure, any suggestions?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Using SciTE with LÖVE

Post by Robin »

How about

Code: Select all

command.go.*.lua="C:\Program Files (x86)\LOVE\love.exe" "$(FileDir)"
?

LÖVE doesn't get a main.lua as argument, it gets a .love or the directory the main.lua is in as argument.
Help us help you: attach a .love.
User avatar
Larsii30
Party member
Posts: 267
Joined: Sun Sep 11, 2011 9:36 am
Location: Germany

Re: Using SciTE with LÖVE

Post by Larsii30 »

Is it possible to change the font and the syntex styling like in NP++ ?
User avatar
Uhfgood
Prole
Posts: 35
Joined: Sat Jul 28, 2012 10:04 pm
Location: Oregon, US
Contact:

Re: Using SciTE with LÖVE

Post by Uhfgood »

Robin wrote:How about

Code: Select all

command.go.*.lua="C:\Program Files (x86)\LOVE\love.exe" "$(FileDir)"
?

LÖVE doesn't get a main.lua as argument, it gets a .love or the directory the main.lua is in as argument.
Awesome, this worked beautifully thanks!
Larsii30 wrote:Is it possible to change the font and the syntex styling like in NP++ ?
If you save as a .lua file it has it's own syntax highlighting, but I believe if you go into Options->Open lua properties -- you may be able to modify it further.
Post Reply

Who is online

Users browsing this forum: No registered users and 49 guests