Skip to content

Commit 29dc892

Browse files
Fix Ruby syntax highlighting for predefined variables (zyedidia#3778)
1 parent 5eddf5b commit 29dc892

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

runtime/syntax/ruby.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ rules:
2121
- constant.number: "(?i)\\b0x[0-9a-fA-F][0-9a-f_]*\\b"
2222
- constant.number: "(?i)\\b0b[01][01_]*\\b"
2323
- constant.number: "(?i)\\b[0-9][0-9_]*(['.'][0-9_]+)?(e[\\-]?[0-9_]+)?\\b"
24+
# Predefined global variables
25+
- constant:
26+
start: "[$]([!@&`'+~=/\\\\,;.<>*$?:\"_]|-[A-Za-z0-9_]|[0-9]+)"
27+
end: "\\B|\\b"
2428
# Ruby "Symbols"
2529
- constant: "(i?)([ ]|^):[0-9A-Z_]+\\b"
2630
- constant: "\\b(__FILE__|__LINE__)\\b"

0 commit comments

Comments
 (0)