I often miss CTL + M + O, that collapses all properties and methods in the code editor, when working with Xaml.
I installed Xaml Regions and it is nice but I still miss CTL + M + O
I have played around with:
CTL + M + M
CTL + M + L
CTL + M + P
CTL + M + U
But none of them does what I want.
Is there an extension or even a built-in command that does what I want?
To clearify, I want all children of a resource file collapsed to one row for easier navigation like this:
I recently discovered you can use Ctrl+M, L even though it doesn't work directly. It just takes a little algorithm.
Pressing Ctrl+M, L expands everything if anything is collapsed, otherwise it collapses everything. So when you first open a file, pressing it once should be sufficient. If you've been collapsing and expanding some regions, pressing it once to expand and once to collapse works fine.
This may be too off-topic, however using the VSVim add-on will emulate Vim, unifying a lot of keyboard shortcuts for editing files:
The command
zc
will close a fold (if the cursor is in an open fold), andzo
will open a fold (if the cursor is in a closed fold). It's easier to just useza
which will toggle the current fold (close it if it was open, or open it if it was closed).The commands
zc
(close),zo
(open), andza
(toggle) operate on one level of folding, at the cursor. The commandszC
,zO
andzA
are similar, but operate on all folding levels (for example, the cursor line may be in an open fold, which is inside another open fold; typingzC
would close all folds at the cursor).The command
zr
reduces folding by opening one more level of folds throughout the whole buffer (the cursor position is not relevant). UsezR
to open all folds.The command
zm
gives more folding by closing one more level of folds throughout the whole buffer. UsezM
to close all folds.
Edit: Command sequence in this case would be zM
then zo
.
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