Ren'Py settings for SciTE 2.0.3+

  1. # Define SciTE settings for Ren'Py files.
  2.  
  3. file.patterns.rpy=*.rpy;*.rpym
  4.  
  5. shbang.renpy=rpy
  6.  
  7. filter.renpy=Ren'Py (rpy rpym)|$(file.patterns.rpy)|
  8.  
  9. lexer.$(file.patterns.rpy)=python
  10. lexer.renpy.strings.over.newline=1
  11.  
  12. keywordclass.renpy=at call expression hide image init jump label menu \
  13. onlayer python scene set show with \
  14. and assert break class continue def del elif \
  15. else except exec finally for from global if import in is lambda None \
  16. not or pass print raise return try while yield $ \
  17. play queue stop sound music fadeout fadein channel \
  18. voice sustain nvl clear window
  19.  
  20. keywords.$(file.patterns.rpy)=$(keywordclass.renpy)
  21.  
  22. statement.indent.$(file.patterns.rpy)=10 :
  23. statement.end.$(file.patterns.rpy)=
  24.  
  25. statement.lookback.$(file.patterns.rpy)=0
  26. block.start.$(file.patterns.rpy)=
  27. block.end.$(file.patterns.rpy)=
  28.  
  29. view.indentation.examine.*.rpy=2
  30.  
  31. tab.timmy.whinge.level=1
  32.  
  33. comment.block.renpy=##
  34.  
  35. # Ren'Py styles
  36. # White space
  37. style.renpy.0=fore:#808080
  38. # Comment
  39. style.renpy.1=$(colour.comment),$(font.comment)
  40. # Number
  41. style.renpy.2=
  42. # String
  43. style.renpy.3=$(colour.string)
  44. # Single quoted string
  45. style.renpy.4=$(colour.string)
  46. # Keyword
  47. style.renpy.5=$(colour.keyword)
  48. # Triple quotes
  49. style.renpy.6=$(colour.string)
  50. # Triple double quotes
  51. style.renpy.7=$(colour.string)
  52. # Class name definition
  53. style.renpy.8=fore:#0000FF,bold
  54. # Function or method name definition
  55. style.renpy.9=fore:#007F7F,bold
  56. # Operators
  57. style.renpy.10=bold
  58. # Identifiers
  59. style.renpy.11=fore:#007F7F,bold
  60. # Comment-blocks
  61. style.renpy.12=$(colour.comment)
  62. # End of line where string is not closed
  63. style.renpy.13=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled
  64. # Highlighted identifiers
  65. style.renpy.14=fore:#407090
  66. # Decorators
  67. style.renpy.15=
  68. # Matched Operators
  69. style.renpy.34=fore:#0000FF,bold
  70. style.renpy.35=fore:#FF0000,bold
  71. # Braces are only matched in operator style
  72. braces.renpy.style=10
  73.  
  74. command.name.0.*.rpy=Start Ren'Py
  75. if PLAT_WIN
  76.     command.0.*.rpy="$(RENPY_BASE)/renpy.exe" "$(FileDir)/.."
  77. if PLAT_GTK
  78.     command.0.*.rpy="$(RENPY_BASE)/renpy.sh" "$(FileDir)/.."
  79. command.subsystem.0.*.rpy=1
  80. command.is.filter.0.*.rpy=1
  81.  
  82. #extension.$(file.patterns.rpy)=renpy.lua

With a minimal change, SciTE's Python lexer can be used for formatting of Ren'Py scripts. The property settings below can be used to configure SciTE 2.x to better deal with Ren'Py. Note, however, that properties in SciTE are global, and not per-buffer; if you're switching between Python and Ren'Py files, you'll need to write some Lua code to handle swapping property values whenever tabs are changed and files opened.