Integrating a custom text editor
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Integrating a custom text editor
I have a customized version of SciTE I would like to use instead of the default. However, I can't seem to get shift+E to work properly (even with the default editor). I'm using Linux (Xubuntu), if that makes a difference.
Do you have some example script for how to configure this? The manual doesn't give a full out example, it seems:
http://www.renpy.org/wiki/renpy/doc/ref ... oper_Tools
I tried setting config.editor to True, but that produced errors. I'm not sure of the syntax on this one for setting an editor and such. Anyone else know?
Do you have some example script for how to configure this? The manual doesn't give a full out example, it seems:
http://www.renpy.org/wiki/renpy/doc/ref ... oper_Tools
I tried setting config.editor to True, but that produced errors. I'm not sure of the syntax on this one for setting an editor and such. Anyone else know?
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Integrating a custom text editor
Basically, you want to set the following:
Code: Select all
init:
config.editor = "'/path/to/scite' '%(allfiles)s' '-open:%(filename)s' -goto:%(line)d"
config.editor_transient = config.editor+' -revert:'
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Integrating a custom text editor
Thank you very much for the info! I'll try it out.
Hrmm. I tried it out. It opens the editor, but then it closed again.
I get the following message in the console:
scite: symbol lookup error: /usr/lib/libcairo.so.2: undefined symbol: FT_Library_SetLcdFilter
Any idea why SciTE closes right after it opens and what the error means? I'm using Xubuntu, if that makes a difference.
Am I supposed to change anything in the code other than the path to scite?
Hrmm. I tried it out. It opens the editor, but then it closed again.
I get the following message in the console:
scite: symbol lookup error: /usr/lib/libcairo.so.2: undefined symbol: FT_Library_SetLcdFilter
Any idea why SciTE closes right after it opens and what the error means? I'm using Xubuntu, if that makes a difference.
Am I supposed to change anything in the code other than the path to scite?
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Integrating a custom text editor
I think the problem is because we ship a different version of freetype then your cairo expects. The solution is to create the file scite.sh containing:
chmod +x scite.sh, then use it instead of scite directly.
Code: Select all
unset LD_LIBRARY_PATH
exec /path/to/my/scite "$@"
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Integrating a custom text editor
Ah, it works quite nicely. Thanks for the help. I'm impressed.PyTom wrote:chmod +x scite.sh, then use it instead of scite directly.Code: Select all
unset LD_LIBRARY_PATH exec /path/to/my/scite "$@"
Hmm, now I just need to figure out how to make it so it uses the same instance of scite all the time, but that's a scite issue, I think, if it opens a new tab instead, at least. Is it possible to reload the file at the line, rather than opening a new scite instance? I know that's hoping, but I it's worth asking, I guess. This is still extremely useful, by the way.
Thanks!
P.S.
For those reading this and following along, put the path to the new scite.sh in the config file. This might sound a little redundant to most people.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Integrating a custom text editor
I had to patch scite to support this, it won't support it out of the box. You can grab my patch from:
http://www.bishoujo.us/svn/scite/trunk/ ... mand.patch
http://www.bishoujo.us/svn/scite/trunk/ ... mand.patch
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Integrating a custom text editor
How do I use the patch? Also, do I need to build scite?PyTom wrote:I had to patch scite to support this
Re: Integrating a custom text editor
Would switching out the executables work? i.e. going into Ren'Py's SciTE and just copying that one over the one I have in /usr/bin/, leaving the stuff in /usr/share untouched.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Integrating a custom text editor
hm... not sure. I seem to recall I disabled most of the non-Ren'Py modes in the Ren'Py scite, leaving in only Ren'Py, Python, C, and HTML.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Integrating a custom text editor
Hmm, I tried using the Ren'Py scite executable. It automatically ran with the properties of my system's SciTE, interestingly. Adjusting the path to this didn't keep it with a single instance, though.
Hmm, I tried a few more things. It works, now!
I didn't delete my SciTE, though; I just changed the path to scite in scite.sh to Ren'Py's, and . . . I did something else: I had to make sure
check.if.already.open=1
was set in my SciTE's Global properties, since it seems to ignore how it is already set in the Ren'Py SciTE properties some odd reason.
Hmm, I tried a few more things. It works, now!
I didn't delete my SciTE, though; I just changed the path to scite in scite.sh to Ren'Py's, and . . . I did something else: I had to make sure
check.if.already.open=1
was set in my SciTE's Global properties, since it seems to ignore how it is already set in the Ren'Py SciTE properties some odd reason.
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot]