[EMAIL PROTECTED] wrote:

my post:
I miss this feature, because I think, full power of folding
is only achived, when I write a comment on every fold, while folding every small if, else, case ... doesn't really promote understanding of an source code. Notepad++, which uses also Scintilla, offers this feature, but only for user defined languages, therfore my question: Has a "pure explicit folding" be done within Scintilla or within SciTE? However I fear that doing this exceeds my abilities - I'm a beginner in C++ :-(
---------------------------------------------------------------

answer:
It is best done within Scintilla. Discussion of such features should occur
on the Scintilla mailing list: even if you can't code this yourself, it may
interest someone else. http://mailman.lyra.org/mailman/listinfo/scintilla-interest
---------------------------------------------------------------

Does anybody miss also this feature and has power to implement ist?

My 2 cents. There's some recent work on a lexer that uses regexps, so it is very customizable. I've got the test stuff downloaded somewhere, but lost it. Please search the list archives for the relevant posts. It might offer user-defined folding, or that module might be the best one to be extended for user-defined folding. It's not in the mainstream distribution, though.

I doubt that your requested feature is suitable for the C++ lexer. You said that you are a C++ beginner. I've seen hundreds of thousands of lines of C++ code, and there is really very little need for what you are proposing. Even Notepad++ that you mentioned doesn't do it in its C++ lexer, from what you've said above.

If you look at:
http://lua-users.org/wiki/SciteScripts

It is possible to write Lua scripts to selectively fold a buffer, that is, you can scan for the appropriate items and fold or unfold them. A well-written Lua function can do toggling, so you need to write a single script only, e.g. toggle folds for all block comments of a certain type. Code folds won't be disabled, but you just need to avoid using the normal folding commands and use the Lua script. You'd have to learn Lua and scripting SciTE, though.

HTH,
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to