3 ms·
FWIW... LSE (Language Sensitive Editor) on OpenVMS (an operating system probably older than most readers) did this in the 1980s. I think what this article is g
by OhMeadhbh 2y ago
FWIW... LSE (Language Sensitive Editor) on OpenVMS (an operating system probably older than most readers) did this in the 1980s.
I think what this article is getting at but doesn't quiet explicitly say is people look at code for different reasons. If you're fixing a defect and you think you know where the problem lies, you may want everything to come up folded so you can get to the function you think you want to look at quickly. If you're trying to get a handle on what the code in the file does, you may want everything to come up unfolded. Or maybe you want to unfold all functions that take a particular data structure as a parameter.
The global settings at my installation for the LSE (Language Sensitive Editor) I mentioned earlier were set to fold all .c files. I initially found it annoying, but quickly learned the "unfold everything" key sequence. And then the "unfold this function once" which didn't unfold the contents of loops or ifs and the "unfold everything in this function." I was able to quickly get used to it and spent a year replicating the functionality in emacs.
But... I completely agree with people saying this should be a configurable setting.
And... if you implement this, please allow selective unfolding of different parts of the code.