On 7 Jan 2014, at 13:34, Ingo Lantschner wrote:
- New TM document
- Select Perl as language (taskbar)
- Write some code
- Write a sub
- Write some POD in the sub, starting with `=head2`
- Press enter
- 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.