2

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

jps
  • 15,760
  • 14
  • 59
  • 71
Alain BUFERNE
  • 1,868
  • 2
  • 22
  • 35

1 Answers1

12

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
  • 15,760
  • 14
  • 59
  • 71
  • 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