Is there a way to "collapse" functions and values in VS2008, like one would do for objects in languages like C#? It's incredibly time-consuming and frustrating to wade through hundreds of lines of nested function definitions.
So, the official answer is that this is not supported. However, when I was doing an internship with the F# team, I wrote a prototype implementation of this feature. Because the F# team had other more important things to do, this was never properly tested and it was not included in the final version.
The code for the feature is actually still present in F# and the feature can be turned on by adding the following to the devenv.exe.config
file:
<appSettings>
<add key="fsharp-regions-enabled" value="true" />
</appSettings>
Apparently, it's not exactly what you wanted, because you can only collapse modules and type definitions, but it could still be useful - it is difficult to decide what to make collapsible in F#, because F# has so many nested declarations...
BTW: Did I mention that this is not tested and it can crash Visual Studio or even collapse the universe?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With