Formatting in SP 4

dbbishopdbbishop Posts: 13 Bronze 2
edited September 17, 2009 12:20PM in SQL Prompt Previous Versions
In SP 3, when I typed in code, and hit ENTER, the cursor moved to align with the start of the previous line, thus if I entered:
SELECT        col1,
                   col2,[ENTER]

the cursor would be in the same column as the start o col2.

Now, the cursor always popsitions itself at the start of the line. I do not see any settings under OPTIONS that lets me change this behavior. Is it gone, or am I missing a setting?

Comments

  • dbbishopdbbishop Posts: 13 Bronze 2
    I should have used formatting in the example. col2 should start in the same column as col1.
  • Hello,

    Cursor failing to align along the previous line - bug!
    We are working on having it fixed and should have a release build that addresses this issue shortly. We will keep the forum posted when this build is made available for download.
    Thank you for your patience and apologies for the inconvenience.

    Regards,
    Tanya
    Project Manager
    Red Gate Software Ltd
  • Hello,

    Just a quick update, the cursor allignment issue is now fixed :)

    http://www.red-gate.com/MessageBoard/vi ... php?t=9517


    Regards,
    Tanya
    Project Manager
    Red Gate Software Ltd
  • tanya wrote:
    Hello,

    Just a quick update, the cursor alignment issue is now fixed :)

    Thanks for the quick update, but it still isn't totally how I would expect it.

    Given this:
    SELECT
      1 AS Field1,
      2 AS Field2,
      3 AS Field3
      <cursor>
    

    If I hit the back space key I expect it to either un-indent one level or back to the previous level, but it only removes one space.
  • CodantiM:

    I believe that is the normal behavior for SQL-Prompt. It does not insert tabs, but rather spaces. I asked about this when I first purchased version 3.x and was hoping that version 4 would use tabs, but it doesn't.
  • I understand that it uses spaces, but I was pretty sure that in SQL Prompt 3 when you backspace it unindented one level. I really don't want to go back to SQL Prompt 3 just to verify that though.
  • CGLuttrellCGLuttrell Knoxville, TNPosts: 39 Bronze 1
    I still have a copy of V3 on another VM and I just tested it and V3 does use tabs or spaces depending on what you used on the line before. But I am seeing similar functionality in V4.
  • OK, I think I figured the problem out, it is how I had SSMS setup, if you have it insert tabs instead of spaces backspace won't unindent a level.

    Given that, I'm not liking the formatting that SQL Prompt does as much anymore, it converts the tabs to spaces, and then you can't unindent with backspace...

    So I think that SQL Prompt needs to either:
    * Unindent one level when you backspace at the beginning of a line
    or
    * Give an option to have the format SQL use tabs instead of spaces
Sign In or Register to comment.