Simple VSIX extension that adds a command to collapse comments in the open code file.
Ctrl+M
, Ctrl+C
collapses all comments (and using
/Import
statements.)
Ctrl+M
, Ctrl+D
expands all comments (and collapses everything else.)
Ctrl+M
, Ctrl+F
toggle comments
Ctrl+M
, Ctrl+K
collapses to definitions and show comments
Ctrl+M
, Ctrl+E
collapses to definitions and collapse comments
Should work with all file types that have the concept of comments.
If the shortcuts don't work, check they're not also being used by something else
Configurable (via Tools > Options):
- collapse (or expand) using/import directives
- auto-collapse when opening a file

This extension is the work of a solo developer and is made available for free.
In return, it collects basic anonymous analytics about the use of the extension.
It may also include a message in the output window asking you to support the ongoing development and maintenance of this and other extensions by becoming a sponsor.
A version of this extension that works with Visual Studio 2017 & 2019 is also available.