开发者

code folding in Visual Studio for F#

I find that I tend to write long source files in F#. Some open source project开发者_运维问答s in F# also have long source files, e.g. FPersec and F# for excel.

So it would be very helpful if code folding (even very limited support) is available in VS for F#. E.g. in a module, we can fold out functions that are stable, only leave functions that are subject to change unfold.

Is this feature easy to be supported, e.g. by a third party vendor?


Folding of F# code is possible with F# Outlinig Visual Studo extension. I can also recommend to look at F# Depth Colorizer.


Unfortunately, this feature is not available in F# (neither #region, nor folding of, for example, let bindings or type declarations as in C#).

I would also love to see this in future versions of F# - in fact, I tried writing a prototype of this feature during my internship at MSR, but it was (sadly) more difficult than it looked at first, so the code never reached the production quality and there were many far more important things that the F# team needed to focus on before the VS 2010 release...

Regarding third party support - If it is possible to implement code folding as an addition to the existing F# language service, then it should be possible (simply by looking for some special comments such as (* #region Some name*)), but I'm not 100% sure if that can be added by some plugin or macro.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜