[TxMt] list (ul/ol) HTML snippet question

Adam Stacoviak adam at image202.com
Thu Oct 12 22:02:07 UTC 2006


Thanks Allan.

The code works perfectly! I've tried to insert a variable inside...

	<${1:ul}>
${TM_SELECTED_TEXT/(.+)(?:\n(.+))?/		<li class="${3:odd}">$1<\/li>(?2: 
\n		<li>$2<\/li>)/g}
	</$1>

...and this is the result...

	<ul>
		<li class="${3:odd}">dfadfadfadfadfad</li>
		<li>fadfadfadfdaf</li>
		<li class="${3:odd}">afdfadfdafd</li>
	</ul>

How can we adjust the class to be the next tab stop with a default? I  
also adjusted your code to allow for a clean indentation of the li  
elsments.

Thanks for the help. :)



More information about the textmate mailing list