Look under edit - outlining , I use the short cuts there to collapse and expand code sections and regions but never had it do it by itself.