I uncovered this problem originally using the latest version of SQL Prompt 5, but I'm using 6 right now and it is unchanged.
Windows 7 SP1
Management Studio (MS): 11.0.2100.60
MS is configured for Block Indenting (as you may have inferred) with its Tab and Indent sizes set to 4. MS is also configured to keep tabs.
SQL Prompt: 220.127.116.112
SQL Prompt's "Tabs & Wrapping" behavior is set to only use tabs, which are also set to 4 spaces.
The problem itself is best demonstrated by example...
• Configure your system as described above and then enter the following code, using whatever table you have handy:
- Code: Select all
[dsr].[Audit] AS A
[A].[Activity] = 'Update'
• With your cursor at the end of 'Update' on Line 6, press <Enter>. If your system is properly configured for this experiment, your cursor should now be sitting on the next line (7), indented one tab. Verify that Block Indenting is currently working by pressing your left arrow key. The cursor will skip left one full tab. This is the desired behavior.
• Press the backspace key to return your cursor to the end of Line 6, and then press <Enter> once more. Your cursor will again be on Line 7, indented one tab.
• Type AND. If your suggestion window displays, press <Enter> to insert AND into your code. If not, do not press <Enter>. Your code should now look like this (with your cursor at the end of the AND on Line 7):
- Code: Select all
[dbo].[Audit] AS A
[A].[Action] = 'Update'
• Press <Enter>. If you are suffering from the same problem as myself, you will see your cursor drop to Line 8, but it will not be indented as it should be. If you then press your right arrow key, you will see that SQL Prompt has inserted four spaces instead of a tab, completely breaking the expected Block Indenting / Keep Tabs behavior.
• Note that disabling SQL Prompt code suggestions fixes this issue.
Is anyone familiar with this issue? I took pains to try and find reference to something similar in the forum, but was unable.
This is a truly frustrating issue, as it requires numerous superfluous key presses with almost every new line of code.
Thank you in advance for any help you can provide.
(I freakin love Tab History btw; thanks for adding it!)