[TxMt] auto HTML table snippet

Yann B textmate at minimaldesign.net
Sat Mar 10 00:17:09 UTC 2007


Is it doable? (I bet it is, but I can't figure it out).
I want to create a HTML snippets that transforms a tab delimited  
table into an HTML table, fo instance, I'd select this:

item_01	item_02 item_03
item_11	item_12 item_13
item_21	item_22 item_23

hit a key combo, and get:

<table>
	<tr><th>item_01</th><th>item_02</th><th>item_03</th></tr>
	<tr><td>item_11</td><td>item_12</td><td>item_13</td></tr>
	<tr><td>item_21</td><td>item_22</td><td>item_23</td></tr>
</table>

I guess my biggest problem is to figure out how to get it to work  
with any number of row and column...

Any help much appreciated...  Thanks!



More information about the textmate mailing list