Command Palette: Create Manual Folding Range From Selection
That Manual Folding Range command has a default keybinding: Ctrl+KCtrl+,
You could put those two commands into a macro if you wanted, see the macro extension multi-command.
I don’t think there is any way to have the Search Editor default to all folded – unless you put however you open that into the macro as well.
Doing that using multi-command, make this keybinding:
{
"key": "ctrl+w", // whatever keybinding you want
"command": "extension.multiCommand.execute",
"args": {
"interval": 500, // you need some delay to open the editor first
"sequence": [
"search.action.openInEditor",
"editor.action.selectAll",
"editor.createFoldingRangeFromSelection"
]
},
"when": "hasSearchResult && searchViewletFocus"
}
2
Answers
I found the
cmd
+k
,cmd
+0
will fold all up to the first line, but then I can open enough to see what I need. Not ideal, but useable.You can fold all the results by doing this:
Create Manual Folding Range From Selection
That
Manual Folding Range
command has a default keybinding: Ctrl+K Ctrl+,You could put those two commands into a macro if you wanted, see the macro extension
multi-command
.I don’t think there is any way to have the Search Editor default to all folded – unless you put however you open that into the macro as well.
Doing that using multi-command, make this keybinding: