How do I collapse/minimise sections of code in the on-site code-editor?

I accidentally managed to collapse a section and a div while working on my code for a certificate project, but can’t figure out how to replicate it.

I would like to be able to collapse sections of my projects while I’m working to help streamline the process of completing my certification projects without needing to scroll through my html to ind where I am.

My guess is that you accidentally used a keyboard shortcut. Try the VSCode shortcuts to collapse a section:

  • Ctrl + Shift + [ on Windows and Linux.
  • ⌥ + ⌘ + [ on macOS

Doesn’t work, I’m afraid

I’m able to use that shortcut when my cursor is in the first line of a code block, but it’s totally possible that your computer or another piece of software already has those keyboard shortcuts mapped to a different function. If you are working on longer pieces of code, and you really want the ability to collapse sections, then it might be easiest just to work in a text editor with syntax formatting (Sublime, Notepad++, VSCode, etc).

in my opinion as i have experienced with this you can also use notepad++ or sublime as well to avoid that shortcut keys errors.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.