Shortcut Request - Remove line breaks

Zierde01Zierde01 Posts: 10 Bronze 1
I love the shortcut to add quotes and commas, but often I want to reduce the list to one line, can you add a remove line breaks (returns) shortcut. Maybe even make a shortcut that is "add quotes and commas and reduce to one line"?
Tagged:

Answers

  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @Zierde01,

    Thanks for your post!

    There is actually a formatting option that could help with this: Global>Whitespace>Preserve existing empty lines between statements. If you disable that option, then using the Formatting shortcut (CTRL+K+Y) would reduce any whitespace to one line.

    Would that help, or are you looking for something to just reduce whitespace and not apply any other formatting?

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • Zierde01Zierde01 Posts: 10 Bronze 1
    It sounds like this solution would reduce all my code to one line if I choose to format a document or a segment of code, is that correct?  I don't want to change my general formatting setup for when I format code...just give myself an option to automatically reduce a highlighted section of code if I desire.  Thats why I thought the shortcut ability sounded like a good choice...I could do an add quotes and commas then follow it with a remove line breaks and I'd have a one line list of things.
  • Zierde01Zierde01 Posts: 10 Bronze 1
    I was thinking about this request and decided to check in on it and see if it had been added or any new comments on it.  Just to confirm, I'm thinking that if I get a list of numbers, like:
    10
    11
    12
    13

    I can use the "Add quotes and commas" action, which is great, it produces a list like:
    '10',
    '11',
    '12',
    '13'

    but ideally, I'd like the ability to further reduce it if I choose, so that it could be   '10','11','12','13'

    So another action from the Q menu for "Remove linebreaks" or "remove empty space" would be a great addition.
  • Zierde01Zierde01 Posts: 10 Bronze 1
    Just wondering if this functionality was being considered or if you had decided to not add this?  I certainly would like it and use it, which makes me think it would be valuable to others.
  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @Zierde01,

    I'm so, so sorry for missing your last few posts!

    There aren't any plans for this at the moment, but can I please ask that you post a request for this on our uservoice forum here: https://redgate.uservoice.com/forums/94413-sql-prompt. That's the best place for requests as other users can add their votes too.

    I'll pass on the details to our developers as well as I can see the usefulness of a "remove empty space" and/or "remove line breaks" option.

    Thank you and sorry again for the delay!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.