Setting Up RenPy File Format in JetBrains/IntelliJ's PyCharm Editor

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.
Post Reply
Message
Author
User avatar
Kaji
Regular
Posts: 87
Joined: Thu Nov 17, 2022 10:17 pm
Github: Kaji01
Discord: Kaji#7767
Contact:

Setting Up RenPy File Format in JetBrains/IntelliJ's PyCharm Editor

#1 Post by Kaji »

Here are the specifics for how I've got it set up in PyCharm, for the curious. Open to any improvements to the groupings that people want to suggest!

To create a custom file type, go to Settings > Editor > File Types, and then in the Recognized File Types panel hit the + to create your RenPy file type. Fill it out using the settings below the break.

Once it's been set up, go to the File Name Patterns in the panel to the right and add *.rpy to the list for RenPy files.

Lastly, if you want to minimize hassle from Github when working with RenPy projects, you can click on Ignored Files and Folders at the top and add the following:
  • *.rpyc
  • *.rpym
  • *.rpymc
  • game/cache
  • game/saves
  • errors.txt
  • log.txt
  • traceback.txt
======

Basic Syntax Highlighting settings at the top are as follows:
  • Line Comment: #
  • Only at line start: unchecked
  • Block Comment Start: """
  • Block Comment End: """
  • Hex Prefix: blank
  • Number Postfixes: blank
  • Support paired braces: checked
  • Support paired parens: checked
  • Support paired brackets: checked
  • Support string escapes checked
Then from there the Keywords panel has four groups that each get highlighted in different ways. Here's how I've got them set up:

Keyword Group 1

Code: Select all

_in_replay
about_label
about_label_text
about_text
action
add
adjust_spacing
after_load
after_warp
alpha
alternate
always
anchor
and
as
at
attribute
auto
background
bar
base_bar
before_main_menu
behind
block
bottom_bar
bottom_margin
bottom_padding
box_wrap
button
button_text
call
camera
check_button
check_button_text
check_label
check_label_text
check_vbox
choice_button
choice_button_text
choice_vbox
color
cols
confirm_button
confirm_button_text
confirm_frame
confirm_prompt
confirm_prompt_text
def
default
define
delay
device
dialogue
dissolve
draggable
elif
else
empty
event
expression
fadein
fadeout
fixed
font
for
foreground
frame
from
game_menu_content_frame
game_menu_label
game_menu_label_text
game_menu_navigation_frame
game_menu_outer_frame
game_menu_scrollbar
game_menu_side
game_menu_viewport
game_menu_vscrollbar
grid
group
gui_button
gui_button_text
gui_label
gui_label_text
gui_side
gui_slider
gui_text
gui_viewport
gui_vscrollbar
has
hbox
height
help_button
help_button_text
help_label
help_label_text
help_text
hide
hide_windows
history_label
history_label_text
history_name
history_name_text
history_text
history_window
hover_color
hover_underline
hyperlink_text
if
if_changed
image
import
in
init
init offset
input
input_prompt
interface
is
jump
key
key_events
label
label_text
language
layeredimage
layout
left_bar
left_margin
linear
loop
main_menu
main_menu_frame
main_menu_text
main_menu_title
main_menu_vbox
main_menu_version
menu
min_width
modal
mousewheel
music
mute_all_button
mute_all_button_text
name
namebox
namebox_label
navigation_button
navigation_button_text
noloop
not
notify
notify_appear
notify_frame
notify_text
null
nvl_button
nvl_button_text
nvl_entry
nvl_label
nvl_thought
nvl_window
object
offset
on
onlyaer
or
order_reverse
padding
page_button
page_button_text
page_label
page_label_text
page_name_value
pagekeys
pass
pattern
pause
play
pos
predict
pref_label
pref_label_text
pref_vbox
prompt
prompt_text
properties
python
python_object
queue
quick
quick_button
quick_button_text
quit
radio_button
radio_button_text
radio_label
radio_label_text
radio_vbox
repeat
return
return_button
return_button_text
right_bar
right_margin
right_padding
say_dialogue
say_label
say_thought
scene
screen
scroll
scrollbar
scrollbars
show
side_yfill
size
size_group
skip_frame
skip_text
skip_triangle
slider
slider_button
slider_button_text
slider_label
slider_label_text
slider_pref_vbox
slider_slider
slider_vbox
slot_button
slot_button_text
slot_name_text
slot_time_text
sound
spacing
splashscreen
start
stop
style
style_prefix
subpixel
substitute
sustain
tag
test_button
text
text_align
text_color
textbutton
thumb
tile
timer
top_bar
top_margin
top_padding
transclude
transform
translate
unscrollable
use
value
variant
vbar
vbox
viewport
voice
volume
vpgrid
vscrollbar
vslider
while
window
with
xalign
xanchor
xfill
xmargin
xmaximum
xoffset
xpadding
xpos
xsize
yalign
yanchor
yfill
yfit
yinitial
ymaximum
yoffset
ypadding
ypos
ysize
zorder
Keyword Group 2

Code: Select all

AudioData
Borders
Character
Dissolve
EndReplay
FileAction
FileDelete
FilePage
FilePageNameInputValue
FilePageNext
FilePagePrevious
FileSaveName
FileScreenshot
FileTime
Frame
GameCalibrate
GamepadExists
Hide
Image
InvertSelected
MainMenu
Movie
Play
PlayCharacterVoice
Preference
QuickLoad
QuickSave
Quit
Return
Rollback
SetCharacterVolume
SetMixer
SetMute
SetScreenVariable
SetVoiceMute
ShowMenu
SideImage
Skip
Start
ToggleMute
ToggleVoiceMute
Toggler
VoiceInfo.auto_filename
VoiceInfo.filename
VoiceInfo.sustain
VoiceInfo.tag
VoiceReplay
_
_get_voice_info
_p
_window_hide
_window_show
about
build.classify
build.documentation
build.name
choice
config.
config.after_load_transition
config.character_id_prefixes
config.character_id_prefixes.append
config.end_game_transition
config.enter_transition
config.exit_transition
config.fade_music
config.game_menu_music
config.has_autosave
config.has_music
config.has_quicksave
config.has_sound
config.has_voice
config.history_length
config.intra_transition
config.language
config.layers
config.main_menu_music
config.menu_arguments_callback
config.name
config.nvl_list_length
config.overlay_screens
config.overlay_screens.append
config.sample_sound
config.sample_voice
config.save_directory
config.thumbnail_height
config.thumbnail_width
config.version
config.voice_filename_format
config.webaudio_required_types
config.window
config.window_hide_transition
config.window_icon
config.window_show_transition
confirm
delayed_blink
file_slots
game_menu
gamepad_help
gui.
gui.about
gui.accent_color
gui.bar_borders
gui.bar_size
gui.bar_tile
gui.bar_title
gui.button_borders
gui.button_height
gui.button_image_extension
gui.button_properties
gui.button_text_font
gui.button_text_hover_color
gui.button_text_idle_color
gui.button_text_insensitive_color
gui.button_text_properties
gui.button_text_selected_color
gui.button_text_size
gui.button_text_xalign
gui.button_tile
gui.button_width
gui.check_button_borders
gui.choice_button_borders
gui.choice_button_height
gui.choice_button_text_font
gui.choice_button_text_hover_color
gui.choice_button_text_idle_color
gui.choice_button_text_insensitive_collor
gui.choice_button_text_insensitive_color
gui.choice_button_text_size
gui.choice_button_text_xalign
gui.choice_button_tile
gui.choice_button_width
gui.choice_spacing
gui.choice_text_hover_color
gui.confirm_button_text_xalign
gui.confirm_frame_borders
gui.dialogue_text_xalign
gui.dialogue_width
gui.dialogue_xalign
gui.dialogue_xpos
gui.dialogue_ypos
gui.file_slot_cols
gui.file_slot_rows
gui.frame_borders
gui.frame_borders.padding
gui.frame_tile
gui.frame_title
gui.game_menu_background
gui.glyph_font
gui.history_allow_tags
gui.history_height
gui.history_name_width
gui.history_name_xalign
gui.history_name_xpos
gui.history_name_ypos
gui.history_text_width
gui.history_text_xalign
gui.history_text_xpos
gui.history_text_ypos
gui.hover_color
gui.hover_muted_color
gui.idle_color
gui.idle_small_color
gui.insensitive_color
gui.interface_text_color
gui.interface_text_font
gui.interface_text_size
gui.kind_text_color
gui.kind_text_font
gui.kind_text_size
gui.label_text_size
gui.language
gui.main_menu_background
gui.main_menu_text_xalign
gui.muted_color
gui.name_text_font
gui.name_text_size
gui.name_xalign
gui.name_xpos
gui.name_ypos
gui.namebox_borders
gui.namebox_height
gui.namebox_tile
gui.namebox_width
gui.navigation_button_width
gui.navigation_spacing
gui.navigation_xpos
gui.notify_frame_borders
gui.notify_text_size
gui.notify_ypos
gui.nvl_borders
gui.nvl_button_width
gui.nvl_button_xalign
gui.nvl_button_xpos
gui.nvl_height
gui.nvl_list_length
gui.nvl_name_width
gui.nvl_name_xalign
gui.nvl_name_xpos
gui.nvl_name_ypos
gui.nvl_spacing
gui.nvl_text_width
gui.nvl_text_xalign
gui.nvl_text_xpos
gui.nvl_text_ypos
gui.nvl_thought_width
gui.nvl_thought_xalign
gui.nvl_thought_xpos
gui.nvl_thought_ypos
gui.page_button_borders
gui.page_spacing
gui.pref_button_spacing
gui.pref_spacing
gui.quick_button_borders
gui.quick_button_text_idle_color
gui.quick_button_text_selected_color
gui.quick_button_text_size
gui.radio_button_borders
gui.scrollbar_borders
gui.scrollbar_size
gui.scrollbar_tile
gui.selected_color
gui.show_name
gui.skip_frame_borders
gui.skip_ypos
gui.slider_borders
gui.slider_size
gui.slider_tile
gui.slider_title
gui.slot_button_borders
gui.slot_button_height
gui.slot_button_text_idle_color
gui.slot_button_text_selected_hover_color
gui.slot_button_text_selected_idle_color
gui.slot_button_text_size
gui.slot_button_text_xalign
gui.slot_button_width
gui.slot_spacing
gui.text_color
gui.text_font
gui.text_properties
gui.text_size
gui.textbox_height
gui.textbox_yalign
gui.title_text_size
gui.unscrollable
gui.variant
gui.vbar_borders
gui.vscrollbar_borders
gui.vslider_borders
help
history
im.
im.MatrixColor
im.matrix.
im.matrix.tint
keyboard_help
load
mouse_help
navigation
nvl_dialogue
preferences
preferences.
preferences.afm_time
preferences.language
preferences.set_mute
preferences.set_volume
preferences.text_cps
quick_menu
range
renpy.
renpy.block_rollback
renpy.call_in_new_context
renpy.can_show
renpy.change_zorder
renpy.check_image_attributes
renpy.copy_images
renpy.get_all_labels
renpy.get_attributes
renpy.get_available_image_tags
renpy.get_hidden_tags
renpy.get_image_bounds
renpy.get_ordered_image_attributes
renpy.get_placement
renpy.get_registered_image
renpy.get_return_stack
renpy.get_say_image_tag
renpy.get_showing_tags
renpy.get_zorder_list
renpy.has_image
renpy.has_label
renpy.hide_screen
renpy.invoke_in_new_context
renpy.jump
renpy.jump_out_of_context
renpy.list_images
renpy.mark_audio_seen
renpy.mark_audio_unseen
renpy.mark_image_seen
renpy.mark_image_unseen
renpy.mark_label_seen
renpy.mark_label_unseen
renpy.movie_cutscene
renpy.music
renpy.music.get_duration
renpy.music.get_loop
renpy.music.get_pause
renpy.music.get_playing
renpy.music.get_pos
renpy.music.is_playing
renpy.music.play
renpy.music.queue
renpy.music.register_channel
renpy.music.set_pan
renpy.music.set_pause
renpy.music.set_queue_empty_callback
renpy.music.set_volume
renpy.music.stop
renpy.play
renpy.seen_audio
renpy.seen_image
renpy.seen_label
renpy.set_return_stack
renpy.show_layer_at
renpy.show_screen
renpy.showing
renpy.sound
renpy.sound.get_duration
renpy.sound.get_loop
renpy.sound.get_pause
renpy.sound.get_playing
renpy.sound.get_pos
renpy.sound.is_playing
renpy.sound.play
renpy.sound.queue
renpy.sound.register_channel
renpy.sound.set_pan
renpy.sound.set_pause
renpy.sound.set_queue_empty_callback
renpy.sound.set_volume
renpy.sound.stop
renpy.start_predict
renpy.stop_predict
renpy.variant
save
say
skip_indicator
voice
voice_can_replay
voice_replay
voice_sustain
Keyword Group 3

Code: Select all

$
False
None
True
__slots__
adv
centered
extend
name_only
narrator
nvl
vcentered
Keyword Group 4
I'm trying to use this for text tags, but it doesn't seem to be highlighting them consistently—at the very least, the closing tags never seem to get highlighted...

Code: Select all

{/b}
{/i}
{b}
{i}

Post Reply

Who is online

Users browsing this forum: No registered users