I’ve been coding a lot over the past few weeks, and much of the work was to make the code look better by formatting long lines into multiline. Like changing this:
let provider = RepositoryBasedExportRecordByURLProvider(rootId: exportDestinationRootId, exportRootUrl: exportRootUrl, repository: repository)
to this:
let provider = RepositoryBasedExportRecordByURLProvider(
rootId: exportDestinationRootId,
exportRootUrl: exportRootUrl,
repository: repository
)
It becomes tedious when needed to do a lot, so I’ve looked into automation. I believed I heard that Xcode added native GUI support for Swift Format, so I asked people about that. They told me that Swift format is available in Xcode 16, see menu Editor -> Structure -> Format File with ‘swift-format’

But I haven’t even had a chance to try it, because in the same submenu I found Format to Multiple Line, which is exactly what it needed.

It formats selected lines by adding newlines at the exact locations as I do when formatting manually, and has a handy shortcut which is easy to use.