I've looked, but it doesn't look like you can apply specific formatting to just comments.
Quickly turn on/off word wrap in VSCode You can toggle word wrap for the VS Code session by pressing a key combination. On Windows or Linux, simply press Alt+Z. On MacOS, you can also press Option ⌥ + Z. Alternatively, one can enable/disable word wrapping by selecting View > Word Wrap from the Menu.
Set Word Wrap GloballyGo to File > Preferences > Settings and type in “word wrap” in the Search settings field. Then, where it says Editor: Word Wrap, select on from the drop-down menu. That's it!
Well, there is an Add-In which will automatically format your comments to a given width (as a side feature).
It is HyperAddIn - the main feature of which is allowing you to create 'hyperlinks' to other places in your code within comments, like this:
// The other half of this logic is in code:ComponentManager.Initialise()
With HyperAddIn installed, the code:ComponentManager.Initialise()
becomes a clickable link.
I have it installed, it works OK, but I must admit that most of the time I don't have the comment formatting switched on.
No. The shortcut is Ctrl+E, Ctrl+W.
There would be one trick how to format the comments. Write your own code snippet for the comment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With