Skip to content
| Marketplace
Sign in
Visual Studio>Tools>MultiLineComments
MultiLineComments

MultiLineComments

Sven Olsen

|
1,162 installs
| (2) | Free
A quick and dirty implementation of Matlab-style word wrapping for inline comments. I've posted the source, so you should be able to customize it however you like ;-)
Download

This is my little experiment with the Visual Studio SDK -- the goal is to implement Matlab-style comment wrapping.  

For those of you who haven't experienced the joys of Matlab's editor, the basic idea is that when you type inside a comment block, the words wrap more or less like they would inside a word-processor -- but the editor adds and deletes new inline comment prefixs as needed. 

Additionally, I've added in a little logic to wrap C-style multiline strings.  Specifically, if you have a quoted string on a line that contains no other non-whitespace characters, the string will be wrapped and formatted as a sequence of quoted strings (which the C compiler will implicitly re-concatenate into a single string literal).

While Visual Studio does have a word-wrapping option, it's not context sensitive, and it tends to lead to ugly code. Brittany Behrens has anice addon that adds some context sensitivity to the default word wrapping implementation, but even it's not ideal for commenting, as if you assume word wrapping when writing comments anyone who doesn't have wrapping enabled will have a hard time reading your code.

My source code is pretty simple, and I've posted it on codeplex.

Feel free to email me with any bugfixes :)

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft