6

Is there a way to fold/expand a large selection of functions(javascript code) in Visual Studio Code?

jps
  • 20,041
  • 15
  • 75
  • 79
Alain BUFERNE
  • 2,016
  • 3
  • 26
  • 37

1 Answers1

22

ctrlkctrl0 will fold all:

all folded

and

ctrlkctrlj will unfold all

But it works on the whole file, not on a selection. You can also fold only a certailn level with the commands

ctrlkctrl1 ... ctrlkctrl9 for level 1 ... 9

You find these shortcuts in the keyboard shortcuts: ctrlkctrls

Community
  • 1
  • 1
jps
  • 20,041
  • 15
  • 75
  • 79
  • This answer is a duplicate of https://stackoverflow.com/questions/30067767/how-do-i-collapse-sections-of-code-in-visual-studio-code-for-windows. – Mark Jul 20 '17 at 18:27