Skip to content

Instantly share code, notes, and snippets.

@kulp
Last active February 17, 2017 20:34
Show Gist options
  • Save kulp/a6ba63b8f8c45fc5d63d to your computer and use it in GitHub Desktop.
Save kulp/a6ba63b8f8c45fc5d63d to your computer and use it in GitHub Desktop.
tenyr syntax file for TextMate 2 / SublimeText 2
{ patterns = (
{ name = 'variable';
match = '\b([A-Pa-p])\b';
},
{ name = 'string.quoted.double';
begin = '"';
end = '"';
},
{ name = 'string.quoted.single';
begin = "'";
end = "'";
},
{ name = 'keyword.other.cpp.directive';
begin = '^\s*#\s*(endif|if|define|include)';
end = '$';
},
{ name = 'comment.line.block';
begin = '/\*';
end = '\*/';
},
{ name = 'comment.line.double-slash';
begin = '//';
end = '$';
},
{ name = 'comment.line.number-sign';
begin = '#';
end = '$';
},
{ name = 'constant.numeric';
match = '-?\b(0x[0-9a-f]+|0[0-7]+|[0-9]+)\b';
},
{ name = 'keyword.control';
match = '\billegal\b';
},
{ name = 'keyword.operator.arrow';
match = '(<-|->)';
},
{ name = 'keyword.operator.bracket';
match = '(\[|\])';
},
{ name = 'keyword.operator.binop';
match = '/(\^\^|[<>=]=|[|&]~?|<<|>>>?|[-+*<>^@])/';
},
{ name = 'keyword.other.directive';
match = '\.(word|ascii|utf32)\b';
},
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment