Hello all, I’m trying to create a custom syntax highlighting rule for sublime text 2. Here is what I want:
/***
special comment goes here
***/
I just want the above to be a different color than the default comment color. I’m using javascript so I added this to the JavaScript.tmLanguage file:
<dict>
<key>begin</key>
<string>/\*{3}</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>comment.block.special.js</string>
</dict>
</dict>
<key>end</key>
<string>\*{3}/</string>
<key>name</key>
<string>comment.block.special.js</string>
</dict>
and this doesn’t seem to work. However if I have:
/aaa
special comment goes here
bbb/
and this added to the tmLanguage file:
begin
/a{3}
captures
0
name
comment.block.special.js
end
b{3}/
name
comment.block.special.js
Then the lines get the styling specified by comment.block.special.js. I’m pretty sure that regular expression is correct and I have tested it in some online editors and it matches correctly. Is there something I am doing wrong?
Thanks!