Syntax highlighting in Sublime Text 2

So, I was trying to figure out how to add syntax highlighting for a name typedefin C ++ files, in sublime text.

For example, if I have typedef long long integer;, I want to highlight integer(preferably the same color as the other types: int, booland so on). I went to see the C.tmLanuage file and tried to add the following regex code ^typedef.*?\s(\w+)\s*;in storage.type.c(line 49), but that didn't work. If I add a word string, it will highlight all instances of the dictionary string. I tried going into the C ++ tmLanguage file and adding the regex code in storage.type.c++, but it still doesn't work.

Does anyone know how to highlight typedefin sublime text?

Also, is there a way to get syntax highlighting for a class name? Let's say I announce stringor vector, I would like to highlight either string, or vector.

+5
source share
1 answer

( ), - typedef foo; , tmLanguage. TextMates, (http://manual.macromates.com/en/language_grammars#language_grammars). PlistJsonConverter ( JSON , XML). , , (, , typedef end, , ;). , .

, , , - . , , . .

Edit:

JSON. (), []. JSON . - , wikipedia - . , , " ". ( , ), http://docs.sublimetext.info/en/latest/extensibility/syntaxdefs.html. , , , http://docs.sublimetext.info/en/latest/extensibility/syntaxdefs.html#analyzing-patterns. , , . , , , - , .

tmLanguage Plist json. .

+2

All Articles