[TxMt] VIM // {{ and // }} equivalents for Ruby in TextMate
Mark Cotner
mark.cotner at gmail.com
Wed Jan 17 23:15:44 UTC 2007
If anybody is used to the // {{ and // }} folding in vim and wants the same
in TextMate you can use the following language config to do similar things
with Ruby.
#begin ten
=begin
This is inline documentation
=end
def ten
10
end
#end
The following will create a fold between #begin and #end as well as add a
fold for =begin/=end comments.
Add the following two lines to your Ruby language file in the
foldingStartMarker section . . .
|begin
|=begin # line 1
|[#]begin # line 2
|for|while|until
and these two to your foldingEndMarker section . . .
| ^ \s*+ [}\]] \s*+ ([#].*)? $
| [#] .*? \(end\) \s*+ $ # Sune's special marker
|^=end$ # line 1
|[#]end$ # line 2
)';
Hope this is helpful.
'njoy,
Mark
--
Cropp's Law:
The amount of work done varies inversly with the time spent in the
office.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20070117/293fe2e0/attachment.html>
More information about the textmate
mailing list