ruby.syntax 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. #Ruby syntax file derived from perl syntax by Marco Ciampa <ciampix@libero.it>
  2. #alpha version 0.2 16/05/2003
  3. context default
  4. #Bang path
  5. keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
  6. keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
  7. keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
  8. keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
  9. keyword whole linestart #!\[\s\]/bin/ruby brightcyan black
  10. #Operators
  11. keyword > yellow
  12. keyword < yellow
  13. keyword - yellow
  14. keyword \+ yellow
  15. keyword \* yellow
  16. keyword / yellow
  17. keyword % yellow
  18. keyword = yellow
  19. keyword \+= yellow
  20. keyword -= yellow
  21. keyword == yellow
  22. keyword != yellow
  23. keyword === yellow
  24. keyword <=> yellow
  25. keyword ! yellow
  26. keyword ~ yellow
  27. keyword =~ yellow
  28. keyword & yellow
  29. keyword | yellow
  30. keyword .. yellow
  31. #System variables
  32. #Please note that in regular expressions the final $/ is not correctly
  33. #highlighted as a system variable. This is not right but I actually do
  34. #not know any way to avoid it. Any idea is welcome.
  35. keyword $\{!@&\+`'=~/\\,.;<>_\*"$:F?\} red
  36. keyword $\{\0123456789\} red
  37. keyword $-+ red
  38. keyword whole $defout red
  39. keyword whole $DEBUG red
  40. keyword whole $F red
  41. keyword whole $FILENAME red
  42. keyword whole $LOAD_PATH red
  43. keyword whole $SAFE red
  44. keyword whole $VERBOSE red
  45. keyword whole __FILE__ red
  46. keyword whole __LINE__ red
  47. keyword whole BEGIN red
  48. keyword whole END red
  49. keyword whole DATA red
  50. keyword whole RUBY_PLATFORM red
  51. keyword whole RUBY_RELEASE_DATE red
  52. keyword whole RUBY_VERSION red
  53. keyword whole $stdin red
  54. keyword whole STDIN red
  55. keyword whole $stdout red
  56. keyword whole STDOUT red
  57. keyword whole $stderr red
  58. keyword whole STDERR red
  59. keyword whole argv red
  60. keyword whole ARGV red
  61. keyword whole ARGF red
  62. keyword whole env red
  63. keyword whole ENV red
  64. #Braces &
  65. keyword { brightcyan
  66. keyword } brightcyan
  67. keyword ( brightcyan
  68. keyword ) brightcyan
  69. keyword [ brightcyan
  70. keyword ] brightcyan
  71. keyword , brightcyan
  72. keyword : brightcyan
  73. keyword whole false brightred
  74. keyword whole FALSE brightred
  75. keyword whole nil brightred
  76. keyword whole NIL brightred
  77. keyword whole true brightred
  78. keyword whole TRUE brightred
  79. #Variables
  80. keyword wholeright $+ brightgreen
  81. keyword wholeright @+ white
  82. keyword \\" brightred
  83. keyword \\' brightred
  84. #Reserved words (see ruby manual)
  85. keyword whole def magenta
  86. keyword whole alias magenta
  87. keyword whole and magenta
  88. keyword whole begin magenta
  89. keyword whole break magenta
  90. keyword whole case magenta
  91. keyword whole class magenta
  92. keyword whole defined\? magenta
  93. keyword whole do magenta
  94. keyword whole else magenta
  95. keyword whole elsif magenta
  96. keyword whole end magenta
  97. keyword whole ensure magenta
  98. keyword whole for magenta
  99. keyword whole if magenta
  100. keyword whole in magenta
  101. keyword whole module magenta
  102. keyword whole next magenta
  103. keyword whole not magenta
  104. keyword whole or magenta
  105. keyword whole redo magenta
  106. keyword whole rescue magenta
  107. keyword whole retry magenta
  108. keyword whole return magenta
  109. keyword whole self magenta
  110. keyword whole super magenta
  111. keyword whole then magenta
  112. keyword whole undef magenta
  113. keyword whole unless magenta
  114. keyword whole until magenta
  115. keyword whole when magenta
  116. keyword whole while magenta
  117. keyword whole yeld magenta
  118. #First class methods
  119. keyword whole new yellow
  120. keyword whole inherited yellow
  121. keyword whole superclass yellow
  122. #Class module
  123. keyword whole include magenta
  124. keyword whole require magenta
  125. # keyword whole where magenta
  126. #Class numeric
  127. keyword whole abs red
  128. keyword whole modulo red
  129. keyword whole remainder red
  130. #Class IO
  131. keyword whole close yellow
  132. keyword whole crypt yellow
  133. keyword whole delete yellow
  134. keyword whole each yellow
  135. keyword whole gets yellow
  136. keyword whole grep yellow
  137. keyword whole inspect yellow
  138. keyword whole join yellow
  139. keyword whole sync yellow
  140. #Class Array
  141. keyword whole index yellow
  142. keyword whole indexes yellow
  143. keyword whole indices yellow
  144. keyword whole size yellow
  145. keyword whole pop yellow
  146. keyword whole push yellow
  147. keyword whole sort yellow
  148. keyword whole shift yellow
  149. keyword whole unshift yellow
  150. #Math module
  151. keyword whole Math::PI red
  152. keyword whole Math::E red
  153. keyword whole atan2 red
  154. keyword whole cos red
  155. keyword whole exp red
  156. keyword whole frexp red
  157. keyword whole ldexp red
  158. keyword whole log red
  159. keyword whole log10 red
  160. keyword whole sin red
  161. keyword whole sqrt red
  162. keyword whole tan red
  163. #Kernel module
  164. keyword whole chomp yellow
  165. keyword whole chomp! yellow
  166. keyword whole chop yellow
  167. keyword whole chop! yellow
  168. keyword whole raise yellow
  169. keyword whole fork yellow
  170. keyword whole rand yellow
  171. keyword whole srand yellow
  172. keyword whole open yellow
  173. keyword whole print yellow
  174. keyword whole printf yellow
  175. keyword whole sprintf yellow
  176. keyword whole exec yellow
  177. keyword whole eval yellow
  178. keyword whole exit yellow
  179. keyword whole sleep yellow
  180. #this works only with label EOF :-(
  181. #context exclusive whole <<\[\s\]EOF EOF green
  182. context # \n brown
  183. spellcheck
  184. context " " green
  185. keyword \\" brightgreen
  186. keyword \\\\ brightgreen
  187. context ' ' brightgreen
  188. keyword \\' green
  189. keyword \\\\ green
  190. context exclusive ` ` white black