[TxMt] HTML Bundle: Insert Table Row x Column
Hans-Joerg Bibiko
bibiko at eva.mpg.de
Thu Nov 30 22:53:30 UTC 2006
Hi,
I got some mails regarding to Hypersearch > GetAllMatches which can
transform a table written as a TAB b TAB NEWLINE ... to an HTML
formatted <table>. The question was whether it is possible to write a
snippet like 'table TAB' to insert an HTML table based on the user's
dimension input.
I wrote such a semi snippet as a command and I want to post it here.
Maybe it is also interesting for others.
The basic idea is to ask the user for the dimension and style with the
help of a Cocoa inputbox.
Syntax:
row column {style}
delimited by whatever (of course no digit;)
Examples:
3 x 4
will include three rows and four colums where each <td></td> is
written in a separate line
2 3 1
will include two rows and three colums where each <td></td> is written
in one line per row, i.e <td></td><td></td><td></td>
4
will include four rows and four colums where each <td></td> is written
in a separate line
Its scope is text.html and the used shortcut is crtl+shift+t and you
can use TAB to jump to the next cell.
The only question I have is whether it is possible to invoke this
command like a normal snippet via e.g. 'tablexy TAB'.
-Hans
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Insert Table Row x Column.tmCommand
Type: application/octet-stream
Size: 2107 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20061130/2e4659ac/attachment.tmCommand>
More information about the textmate
mailing list