How could I quickly get the outline/toc of file?

current I use
ctrl + A three time to select the whole file, then use ctrl + Up key to collapse, finally, ctrl + Down key to expand one level, but as you can find, it’s inconvenient…

Another less quick option to create a TOC/outline of a larger document with headers is to filter for #Header using a search portal (Pro feature). You can create this easily by opening the filter popup using Ctrl + F and clicking on the #Header tag.

If your headings don’t change (much) you can also use a normal portal and hide non-headers manually using a combination of Ctrl (+ Shift) + Up/Down and Ctrl + Alt + H.

Vote here!