Re:Why Programming is Difficult (2014)
by nitrogen on Saturday January 30, 2016 @10:00PM
(#11005036)
You could probably hack this into an editor with folding support, such as Vim. Just tag each layer with a different folding marker, and bind a hotkey to open/close all folds for that layer.
http://vim.wikia.com/wiki/Folding