The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,444 other followers

Delphi: formatting uses lists to each unit is on a separate line

Posted by jpluimers on 2018/06/29

Delphi formatter setting, so I can manually arrange uses lists:

–jeroen

Uwe Raabe commented on G+:

Also available in MMX Code Explorer in the settings dialog: Pascal -Sorting – Format unit uses clauses – “Each unit on a new line”.
If you prefer the standard setting and spare the other for special purpose, there is “Format Uses – Alternate” in the context menu. Perhaps give it a decent shortcut for quick access.

Bernd Ott in the same thread:

Important because scm. Less merge trouble. Only the last semicolon in last row is always stupid.

4 Responses to “Delphi: formatting uses lists to each unit is on a separate line”

  1. bascy said

    It should move the comma’s to the start of each line and the closing semicolon to a separate line, that would mean even less merge trouble and make it much easier to comment out a line

    • jpluimers said

      In my experience, that does not really matter: if you keep uses lists organised by topic (i.e. not append each new uses list entry at the end), then:

      • with commas at identifier start, the merge trouble is with the first entry
      • with commas at identifier end, the merge trouble is with the last entry

      This is similar to SQL merge issues.

      • bascy said

        True, it won’t eliminate all merge troubles, but as I’m more often changing or adding entries at the end than at the beginning, I think the chance on merge problems is smaller when using commas at the start of a line. The first entries are usually the “common” includes use don my places and they tend to be fairly static.

        • bascy said

          [Edit] …The first entries are usually the “common” includes used on many places and they tend to be fairly static.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: