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
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

#31 Post by Zetsubou »

Multi-line issue is being tracked here: https://github.com/koroshiya/Sublime-Renpy/issues/3
I'll be downgrading from the latest ST3 dev build to the current stable build shortly to test.

Edit: should be fixed in 1.1.13.
It was an issue with labels without brackets (eg. "start:" instead of "start():").
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

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

Re: Renpy language support in Sublime Text

#32 Post by philat »

Kind of random, but since Zetsubou just linked to this thread in the renpy support forum, ahem, I was using this the other day and realized that the menu auto-complete (i.e., typing menu, hitting tab, and getting a template) doesn't work. Is this something wrong on my end, a bug, or a deliberate decision to remove the functionality? It's not a big deal; I was just curious. Thanks again for all your work, Zetsubou. :)

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

#33 Post by Zetsubou »

I gave it a shot just now and the menu autocomplete worked.
As long as you're within a label context, tabbing the menu autocomplete should work.

Which version of ST are you using? I've only ever tested this with ST3, so I can't say how well it works with ST2.
I'm using build 3083 at home and 3095 here.

Also, just to make sure, is your version of RenpyLanguage up to date? 1.2.3 should be the latest.
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

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

Re: Renpy language support in Sublime Text

#34 Post by philat »

Ah, it may be because I'm using ST2 then. (Never bothered with ST3 since it never left beta... *shrug*) It doesn't work within label contexts for me, and I'm on 1.2.3 of RenpyLanguage. Like I said, not a big deal.

ETA: I tried it with ST3 and it works without issue, so it really does seem like an ST2 thing. I'm not seeing much of a functional difference in ST3 (despite beta status) so perhaps I'll just switch to ST3.

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

Re: Renpy language support in Sublime Text

#35 Post by philat »

Me again: I got thrown for a loop when I updated recently and spellcheck was on by default. I was SURE that I'd turned it off on Sublime itself, so I thought I was going crazy. Is there a reason for this update? It just seems unnecessary -- people who want spellcheck on would have it on for Sublime. (I admit that the problem was exacerbated on my end because my games are in Korean rather than English, which has no built in dictionary support so the whole thing was red squiggly lines.)

Minor complaint aside, thanks as always for keeping up the good work. :)

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

#36 Post by Zetsubou »

Initially my goal with spellcheck was to limit the scope.
I enabled spellcheck, saw that it was trying to spellcheck variables and such, and wanted to limit it to actual dialogue.
So after a bit of fiddling I got it so spellcheck should be limited to text within quotes within a label context.

This is a tricky one though. I don't want to force people to use spellcheck, but I think people would find it helpful to have it enabled like this by default.
Unfortunately it doesn't look like an extension can set something to true by default, then allow a user to disable it.
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

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

Re: Renpy language support in Sublime Text

#37 Post by philat »

Oh, I didn't mean to mislead -- it's possible to turn off, you just have to get the scope right. I put "spell_check": false under syntax-specific settings (Preferences -> Settings - More -> Syntax specific - User), and all's well. I stumbled around a bit blindly before finding out how to do it, though, so it would probably be helpful to put that in the change log or instructions or something. Anyhow, I was just wondering on the thought process behind turning it on by default. No worries.

User avatar
RyanKenneth
Newbie
Posts: 1
Joined: Mon Mar 07, 2016 7:23 am
Contact:

Re: Renpy language support in Sublime Text

#38 Post by RyanKenneth »

Finally! Thanks

User avatar
Chibiko
Newbie
Posts: 1
Joined: Sun May 29, 2016 8:14 am
Projects: Guro
IRC Nick: Chibiko
Skype: hofstader
Contact:

Re: Renpy language support in Sublime Text

#39 Post by Chibiko »

Hi, sublime fans.
I create file Sublime.edit.py:

Code: Select all

import renpy
import subprocess

class Editor(renpy.editor.Editor):
    
    def begin(self, new_window=False, **kwargs):
        self.arguments = ["subl"]
        if new_window:
            self.arguments.append('-n')

    def open(self, filename, line=None, **kwargs):
        if line:
            self.arguments.append("+%d" % line)
        filename = renpy.exports.fsencode(filename)
        self.arguments.append(filename)

    def end(self, **kwargs):
        print self.arguments
        subprocess.Popen(self.arguments)
Where "subl" is simlink at sublime binary.
But after open files in RenPy sublime worked strange.
Here is nothing about config.

Post Reply

Who is online

Users browsing this forum: No registered users