How can we improve SQL Prompt?

Moving commas from "end" to "start" is always buggy when comments exist

Moving *commas* from "end" to "start" or vice-versa is buggy when comments exist after each column or parameter. This is an issue regardless of the type of statement (SELECT, INSERT, UPDATE, CREATE TABLE/VIEW/FUNCTION/STORED PROCEDURE, etc).

Here is my original SP with commas at "end" followed by comments (hyphens are used for indentation due to HTML formating issues):
CREATE PROCEDURE dbo.MyProcedure
---- @Param1 int, --Param1 comments
---- @Param2 int, --Param2 comments
---- @Param3 int --Param3 comments
AS
BEGIN
---- SELECT Col1 , --Col1 comments
---- ---- Col2 , --Col2 comments
---- ---- Col3 --Col3 comments
---- FROM MyTable
---- RETURN
END
GO

After CTRL+K+Y, the commas and comments are incorrectly placed on their own separate line:
CREATE PROCEDURE dbo.MyProcedure
---- @Param1 int
---- , --Param1 comments
---- @Param2 int
---- , --Param2 comments
---- @Param3 int --Param3 comments
AS
---- BEGIN
---- ---- SELECT Col1
---- ---- ---- , --Col1 comments
---- ---- ---- Col2
---- ---- ---- , --Col2 comments
---- ---- ---- Col3 --Col3 comments
---- ---- FROM MyTable
---- ---- RETURN
---- END
GO

Alternatively when moving commas from "start" to "end" the commas are placed on their own line, but at least comments follow the statement. Going from either direction, this formatting is both ugly and unproductive. Moving comments to a new line is confusing! Either way this buggy issue robs us of valuable vertical screen space.

We regularly receive code that needs to be re-formatted to our own preferences. Please modify SQL Prompt to always leave both commas AND comments on the same line but still move commas to our preferred location ("start" or "end").

Thank you.

27 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    JoshJosh shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • JoshJosh commented  ·   ·  Flag as inappropriate

        Please also see this similar issue (vote for both if you agree):

        ---- Auto generated INSERT statement is buggy with commas at start

      Feedback and Knowledge Base