It isn't as good as I'd like it to be, but this is the best option I've come up with so far. I created a few custom code snippets in Xcode, each of which replaces a shortcut with an appropriately sized comment block.
For example, I have it replace the shortcut "com1" with an 80-character-wide comment block (for non-indented lines). That's the following code in the Snippet Library in Xcode:
/*******************************************************************************
<#comment#>
******************************************************************************/
For indented lines, I have shortcuts "com2", "com3", and "com4", which are 76, 72, and 68 characters wide (respectively).
======
Also, Xcode's documentation isn't that helpful when it comes to code snippets. To create a new code snippet, show the Utilities view (the pane on the right) and select the {}
icon towards the bottom to show the Code Snippet Library. Select some code to add, and drag it over to the Code Snippet Library (by left-clicking and holding for a second and then dragging - as a Windows user it took me far too long to figure this out). This will create a new entry titled My Code Snippet
at the very bottom of the Code Snippet Library, which you can mouse over and Edit
to your liking.
======
EDIT: Here I have uploaded a zip file containing five code snippets. Levels 1 through 4 (com1, com2, com3, com4) are 80, 76, 72, and 68 characters wide, respectively. Level 0 is a single line comment block that does not automatically format width (I use it for single comments to maintain formatting).
EDIT 2: Also, user code snippets are stored in ~/Library/Developer/Xcode/UserData/CodeSnippets/
.