Home Download Buy Blog Forum Support

inconsistent code indentation on new multi-line blocks

inconsistent code indentation on new multi-line blocks

Postby tyw on Tue Mar 06, 2012 8:35 pm

I'm sure there's a better name for this, and who knows maybe it's already a setting somewhere, but I haven't been able to find it...

ST2 works great when I go to create a block with curly braces. When I type the leading { it automatically inserts a } and leaves the cursor in between them. If I then hit return it correctly indents by putting the } on its own line at the same level as the { and the cursor is on a new blank line in between indented one level deeper.

For example (| is cursor position):
Code: Select all
{|} + return =>
{
   |
}


However if I do this with parenthesis I get this:
Code: Select all
(|) + return =>
(
   |)


And if I try it with HTML tags I get this:
Code: Select all
<div>|</div> + return =>
<div>
|</div>


Is it possible to get the latter two to work like the former?
tyw
 
Posts: 1
Joined: Tue Mar 06, 2012 8:27 pm

Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 20 guests