[TxMt] Re: Indention in Perl POD
mailinglist at textmate.org
Thu Jan 16 14:10:08 UTC 2014
On 7 Jan 2014, at 13:34, Ingo Lantschner wrote:
> 1. New TM document
> 2. Select Perl as language (taskbar)
> 3. Write some code
> 4. Write a sub
> 5. Write some POD in the sub, starting with `=head2`
> 6. Press enter
> 7. Cursor will jump to col4 in the next line (should be in col 1) see
The issue here is that the context above the POD has higher indent than
desired in the POD context.
So while we disable indent (by default) in the POD context (being a
block comment), new lines still get too much indent, as TextMate scans
from current line and up, to find a line it can use to do the indent
calculations, and here it will ignore anything in the POD, as we have
setup the patterns to ignore those lines.
The thinking here was that anything typed in a block comment should have
(initial) indent like what’s above the comment. But that assertion
fails for zero-indented block comments (with indented code above them).
Your workaround, I think, makes it so that TM will just use the indent
from the line above, rather than the first line above the POD context.
This might also work in the general case.
More information about the textmate