Owen James
Owen James

Reputation: 628

How can I tell Visual Studio to rearrange my comments onto multiple lines?

Sometimes when I'm commenting my code in Visual Studio I find that my comments drag out past the rest of my code. Are there any shortcuts, methods, or extensions that rearrange these one-liner-monstrosities into nicely formatted comments spread across multiple lines? Formatting the document does not appear to affect comments.

Say, for example, I wrote a long comment like this:

// If at this point the task has not completed it has exceeded the maximum time and a timeout exception should be thrown.

What would be an easy way to rearrange it into something like the following (other than by hand)?

// If at this point the task has not completed it has exceeded the maximum
// time and a timeout exception should be thrown.

Upvotes: 0

Views: 78

Answers (1)

Sergey Vlasov
Sergey Vlasov

Reputation: 27940

The CodeMaid extension includes Comment Formatting to wrap at a specified column.

Upvotes: 2

Related Questions