I tried this in SSMS, VS2003, and VS2005 and they all behave the same:
If I have a code block as such
BEGIN
END
Put the carret on the blank line between the begin and end ensuring it is on the leftmost position then hit TAB or SPACE. The Result is
BEGIN
END
With the carret on the line above the BEGIN. It gets even wierder if you have code above the BEGIN
IF 1=1
BEGIN
END
Turns into
IF 1=1BEGIN
END
If I have a code block as such
Put the carret on the blank line between the begin and end ensuring it is on the leftmost position then hit TAB or SPACE. The Result is
With the carret on the line above the BEGIN. It gets even wierder if you have code above the BEGIN
Turns into