[TxMt] Help with macro for comments

Guido Governatori guido at itee.uq.edu.au
Fri Nov 2 23:27:37 UTC 2007


What about defining a language (scope) for your comments and then a  
snippet triggered by return in the scope defined by the comment.

All the best

Guido
On 03/11/2007, at 8:13 AM, Steve Finkelstein wrote:

> Hi all,
>
> I'm looking to add a macro that will let me do something like
>
> comment ->
>
> and create an inline comment structure like:
>
> 	/*
> 	 
> +--------------------------------------------------------------------- 
> -----
> 	|   Constructor
> 	 
> +--------------------------------------------------------------------- 
> -----
> 	*/
>
> The only trick is, is it possible to continue pre-pending additional |
> everytime I hit a newline? so if my comment consists of more than one
> line I can do
>
> comment ->
>
> 	/*
> 	 
> +--------------------------------------------------------------------- 
> -----
> 	|   Constructor
>         | <-- added by macro
>         | <-- also added... etc
> 	 
> +--------------------------------------------------------------------- 
> -----
> 	*/
>
> Cheers!
>
> - sf
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate

--
Dr Guido Governatori
School of Information Technology and Electrical Engineering
The University of Queensland
Brisbane, Queensland, 4072, Australia
Phone: +61-(0)7-336 52907
Fax: +61-(0)7-336 54999
http://www.governatori.net/TextMate
http://www.defeasible.org





More information about the textmate mailing list