[TxMt] Indented soft wrap - format string confusion

D. Grady d.c.grady at gmail.com
Mon Dec 26 17:35:37 UTC 2011


Hello all, I was playing around with the new indented soft wrapping feature
in TextMate 2, and I'm a little confused with how this is supposed to work.
In http://article.gmane.org/gmane.editors.textmate.general/33488, Allan
said that the `format` value is expanded and prepended to each wrapped
line. However, try doing this: go into the bundle editor and edit Source >
Settings > Style: Line Comments - Slash, change the format string to
'${0/./a/g}', and save. Then open up a blank document with the language set
to C, hit tab a few times, and type a comment that extends past the
wrapping marker. When I do this, it appears that the `format` string is
being expanding and *appended* to each wrapped line, but that a number of
whitespace characters equal to the length of the `format` string are also
being *prepended* to each wrapped line. Is that what's supposed to happen?

Here's exactly what I see if I set the wrap column to 40 and put 8 spaces
before the beginning of the comment:

        // Lorem ipsum dolor sit amet, aaaaaaaaaaa
           consectetur adipisicing aaaaaaaaaaa
           elit, sed do eiusmod tempor aaaaaaaaaaa
           ...

Is anyone else seeing this behavior as well? I ran across this while trying
to change the settings so that soft-wrapped comments had some sort of
"ghost" comment marker placed at the beginning of each line, for example
some kind of vertical ellipsis like a tricolon ⁝. Is it possible to achieve
that kind of effect with the new soft-wrapping system? Thanks for any
comments!

-Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20111226/239a3e14/attachment.html>


More information about the textmate mailing list