Renpy language support in Sublime Text

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
nintendotoad
Regular
Posts: 42
Joined: Sat Mar 31, 2012 2:56 pm
Location: projectexist.net
Contact:

Re: Renpy language support in Sublime Text

#16 Post by nintendotoad »

Versions 1.0.5 (hiya!) and 1.0.6 just went out over the past 24 hours!

1.0.5 specifically fixes an issue where multi-line quotes (a common occurrence with Ren'Py dialogue) and defines using $'s weren't correctly highlighted.
1.0.6 overrides/fixes hotkeys in a manner such that they function like you'd expect Microsoft Word/OpenOffice to in terms of being able to highlight text to bold, italicize, or underline it.

It's awesome! Go get it!

User avatar
SinnyROM
Regular
Posts: 166
Joined: Mon Jul 08, 2013 12:25 am
Projects: Blue Birth
Organization: Cosmic Static Games
Contact:

Re: Renpy language support in Sublime Text

#17 Post by SinnyROM »

Thanks to all developers for your hard work! Renpy programming never felt smoother.

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Renpy language support in Sublime Text

#18 Post by Zetsubou »

It's been a while, so I figured it was time for an update.
I've made some rather drastic changes, so let me know if there are any issues, anything I've missed, etc.

Anyway, version 1.1.0 is essentially a rewrite. The aim was to make upkeep easier.
The most important change, however, is context-awareness.
Before, this language took an "all or nothing" approach, so all of the Renpy auto-completions and keywords were available everywhere.
Now, I've attempted to separate them. For example, a label block won't autocomplete or highlight python functions, or vice-versa.

I expect some keywords and properties will be missing, so please reply here (or file an issue on Git, or make a pull request) if you find anything missing which should be added. I'm not really interested in anything deprecated or unavailable in 6.99 though.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Renpy language support in Sublime Text

#19 Post by mobychan »

I just opened screens.rpy in sublime:
- ground inside imagemaps isn't orange like xpos and stuff
- the "# The two window variant." comment in say screen has window variant in pink
- Comments are the same color as all text apart from keywords, I think it's nice if comments have different colors though(Maybe just because I'm used to it since the other editors I use have it like this and it was like this before?)
- Strings are white just as everything else(they were dark yellow before I think?)
- I believe numbers had a different color before?
- If/else/for are white
- input(eg in input screen) is white
- init/style aren't working properly(see image)

That's all for now^^

Image

sagex
Newbie
Posts: 2
Joined: Thu Sep 10, 2015 5:43 pm
Contact:

Re: Renpy language support in Sublime Text

#20 Post by sagex »

________________________________________________________________________


I have the same problem ^^
Attachments
Desktop 29-09-2015 05-04-56-19.png
Desktop 29-09-2015 05-04-47-865.png
Last edited by sagex on Tue Sep 29, 2015 5:16 am, edited 1 time in total.

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Renpy language support in Sublime Text

#21 Post by Zetsubou »

Thanks mobychan,

I've just put up a quick fix for text, comments and numbers in "label" blocks.
I'll do a proper fix and look at the other screens tomorrow. It should all be fairly easy to fix.

(btw, I can't see the image. Did you make it public?)
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Renpy language support in Sublime Text

#22 Post by mobychan »

thanks^^
I'll check again after the proper fix^^

strange, the image should be public...
maybe try this link?
https://goo.gl/photos/U5N2yiWdoz846XNcA

sagex
Newbie
Posts: 2
Joined: Thu Sep 10, 2015 5:43 pm
Contact:

Re: Renpy language support in Sublime Text

#23 Post by sagex »

Thanks \o/

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Renpy language support in Sublime Text

#24 Post by Zetsubou »

Ok, most (all?) of that should be fixed in version 1.1.07.
There are no doubt missing keywords, and there are still a couple of things missing, but it's looking much better now.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Renpy language support in Sublime Text

#25 Post by mobychan »

Looks much better ^^

however this issue is still there:
Image

Link to the image if it doesn't work again


EDIT:
the transform keyword is missing ;)

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Renpy language support in Sublime Text

#26 Post by Zetsubou »

Mm, I don't think you're using the latest version.
Though I obviously still have some work to do either way.

Image
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Renpy language support in Sublime Text

#27 Post by mobychan »

You're right, now it looks like your screenshot, still not fully correct, but better^^
Was the $ sign for python code lines white before?
I'm not sure...

philat
Eileen-Class Veteran
Posts: 1900
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Renpy language support in Sublime Text

#28 Post by philat »

Thanks for all the work, Zetsubou. You definitely make working in renpy/sublime much nicer. That said, not sure the logs for 1.1.0.8 are accurate - they specifically call out transforms with brackets and alpha/linear, etc., but those don't seem to work? Maybe I'm just reading the logs wrong.

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Renpy language support in Sublime Text

#29 Post by Zetsubou »

philat wrote:Thanks for all the work, Zetsubou. You definitely make working in renpy/sublime much nicer. That said, not sure the logs for 1.1.0.8 are accurate - they specifically call out transforms with brackets and alpha/linear, etc., but those don't seem to work? Maybe I'm just reading the logs wrong.
You're reading the logs correctly, but it seems I screwed up the last commit/release.
The release says 1.1.8, but the last commit was for 1.1.7. I have 1.1.8 sitting on my work PC, which hasn't been pushed out yet.
I'll try to fix a few things and push out 1.1.9 in a few days. (Weekend + public holiday = 3 days until I have access to it)
mobychan wrote:You're right, now it looks like your screenshot, still not fully correct, but better^^
Was the $ sign for python code lines white before?
I'm not sure...
It was white before.
I had a bit of trouble getting single-line python statements to highlight and auto-fill correctly.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

nintendotoad
Regular
Posts: 42
Joined: Sat Mar 31, 2012 2:56 pm
Location: projectexist.net
Contact:

Re: Renpy language support in Sublime Text

#30 Post by nintendotoad »

My main concern is that the multi-line strings (which are used in label blocks often) aren't really working anymore, and that label blocks seem to be broken.

I can take another look (I'm nolanlemahn on GitHub) eventually, but it's a little weird with both of the following being legal declarations:

Code: Select all

#not truly like a function since initializer list doesn't exist at all,
#not even to have empty parens

label one:
    "Poppy Seed!"

label two(message="Merry Christmas!"):
    "[message]"
Attachments
broken_sltrenpy.png

Post Reply

Who is online

Users browsing this forum: No registered users