VIM script for Ren'Py syntax highlighting?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
LordShiranai
Regular
Posts: 188
Joined: Wed Jul 07, 2010 5:49 pm
Completed: Mobile Food Madness, Super Otome Quest
Location: Pacific Northwest
Contact:

VIM script for Ren'Py syntax highlighting?

#1 Post by LordShiranai »

To avoid reinventing the wheel, I was curious if anyone has already created a VIM script for Ren'Py syntax highlighting.

I am considering making one eventually if one does not already exist, since I cannot seem to find anything mentioned on the forums.
Don't Blame Me. I Voted for Vermin Supreme.

User avatar
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: VIM script for Ren'Py syntax highlighting?

#2 Post by PyTom »

I don't know of any. (I have an emacs mode I use, but it's a bit out of date.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Spiky Caterpillar
Veteran
Posts: 253
Joined: Fri Nov 14, 2008 7:59 pm
Completed: Lots.
Projects: Black Closet
Organization: Slipshod
Location: Behind you.
Contact:

Re: VIM script for Ren'Py syntax highlighting?

#3 Post by Spiky Caterpillar »

My (rather incomplete and outdated, as I tend to only add things to it if I'm actively using them) renpy syntax file can be grabbed from
http://spikycaterpillar.dreamhosters.com/renpy.vim
Nom nom nom nom nom LEAVES.

LordShiranai
Regular
Posts: 188
Joined: Wed Jul 07, 2010 5:49 pm
Completed: Mobile Food Madness, Super Otome Quest
Location: Pacific Northwest
Contact:

Re: VIM script for Ren'Py syntax highlighting?

#4 Post by LordShiranai »

Thank you kindly. :)
Don't Blame Me. I Voted for Vermin Supreme.

User avatar
Musashi
Regular
Posts: 57
Joined: Mon Feb 22, 2010 10:04 am
Projects: Yesoidos
Contact:

Re: VIM script for Ren'Py syntax highlighting?

#5 Post by Musashi »

I found Spiky's syntax file very useful, so I used it, then added some improvements:
  • Spell-checking support
    String tags and escaped characters
    String interpolations (including the new-style interpolations in 6.13)
    Auto-indenting using spaces; the tab key produces four spaces
    Tab characters are highlighted as errors
    TODOs are highlighted in the comments
    More keywords and functions are recognized
    Update: Single-line and block Python sections are highlighted using Python rules
http://yesoidos.sourceforge.net/upload/renpy.vim
Update: https://github.com/chaimleib/vim-renpy

Known Bugs:
Multi-line Python sections aren't recognized properly. Doesn't affect anything else.

Another Vim-related tool:
I have also made an editor file for the Ren'Py launcher, which will launch a GUI version of Vim if you click "Edit Script" or "Check Script (Lint)". It only works with MacVim for Mac OS X so far, but I think it should be easy to get it working on Windows and Linux.

http://yesoidos.sourceforge.net/upload/vim.editor.py

Updated, 2014-12-16: New features, new file location.
Image
(Work in progress)

otaking
Newbie
Posts: 3
Joined: Thu Jun 25, 2020 5:46 pm
Contact:

Re: VIM script for Ren'Py syntax highlighting?

#6 Post by otaking »

https://github.com/chaimleib/vim-renpy

This is pretty old. Last update was 5 years ago. Does it still work? Is there anything that still gets updated. Sorry that I am replying to an old thread.

Post Reply

Who is online

Users browsing this forum: Google [Bot]