[SVN] Indentation issues

Paulo Moura pmoura at di.ubi.pt
Fri Mar 2 15:27:31 UTC 2012


Hi,

TM have a "indentNextLinePattern" but not "unindentNextLinePattern". Is there a way to define a pattern such that the next line is unindented but not the current line? I tried "decreaseIndentPattern" but this setting insist on acting on the current line (while "increaseIndentPattern" acts on the next line; why the apparent lack of symmetry?). The only indentation rule I have (for the Logtalk language) is:

	increaseIndentPattern = '(:-|-->)$';

This rule works as intended. For example, if I type:

	foo :-

as soon as I hit return, the first character in the next line will be intended:

	foo :-
		bar

Now, I would like to unindent the line that *follows* "\.$". For example:

	foo :-
		bar.
	foo2

But I cannot find a way to get this behavior using "decreaseIndentPattern", which results in the line ending with a "." getting unindented instead of the next line.

On TM2, using the same settings that work fine on TM1, indentation is driving me crazy and preventing me to switch to TM2 for everyday programming tasks. Specifically, on TM1, when you insert one of more black lines, TM1 wants to start at the same indent level as the last non-empty line. That's not usually want I want so I just hit backspace, start typing, and everything is fine. But, on TM2, after hitting backspace, the cursor just jumps to the last indent level as soon as I type the first character, forcing me to go back, again, and correct the indentation.

Your help on these issues is most appreciated.

Cheers,

Paulo


-----------------------------------------------------------------
Paulo Jorge Lopes de Moura, PhD
Assistant Professor
Dep. of Computer Science, University of Beira Interior
6201-001 Covilhã, Portugal

Office 3.18  Ext. 3276
Phone: +351 275 242081 Fax: +351 275 319899
Email: <mailto:pmoura at di.ubi.pt>

Home page: <http://www.di.ubi.pt/~pmoura>
Research:  <http://logtalk.org/> Blog: <http://blog.logtalk.org/>
-----------------------------------------------------------------










More information about the textmate-dev mailing list