[TxMt] Re: Restrict characters in multiline strings

Louis Abraham louis.abraham at polytechnique.edu
Sun Nov 1 19:52:08 UTC 2015


You can use a regular expression with the match key. For example in the Python bundle :
{	name = 'constant.numeric.integer.hexadecimal.python';
	match = '\b(?i:(0x\h*))';
};

Grammar writing is well explained there : https://manual.macromates.com/en/language_grammars <https://manual.macromates.com/en/language_grammars> although this in in the TextMate 1 documentation.
> Le 1 nov. 2015 à 20:37, Jacob Carlborg <doob at me.com> a écrit :
> 
> To create a pattern in a TextMate grammar that matches across multiple lines the "begin" and "end" keys are necessary. But is it possible to somehow restrict what is matched between the begin and the end?
> 
> I'm trying to create a pattern for the hex string literal in D. It's like a regular string literal but can only contain hex characters.
> 
> -- 
> /Jacob Carlborg
> 
> 
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20151101/b4ebdb52/attachment.html>


More information about the textmate mailing list