The Null lexer is also used for large files like logs and data files where high performance is desired. Performing folding for these files would break this use case. An alternative would be a new lexer for indent folded plain text.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Zufu,
I did not try the Indent language yet, b/c I'm using Geany (for now). But just in case it helps you: an alternative, in Geany edior, you could make your own filetype/language, using the lexer of python or haskell or coffeescript (which fold based on indentation). It's not hard, that's what I did: https://www.geany.org/manual/current/index.html#creating-a-custom-filetype-from-an-existing-filetype
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Null lexer is also used for large files like logs and data files where high performance is desired. Performing folding for these files would break this use case. An alternative would be a new lexer for indent folded plain text.
Does the first line in FoldNullDoc() has no effect?
if (styler.GetPropertyInt("fold") == 0)
return;
for really large files, I thank the App or user can disable folding.
Existing applications will often have 'fold' set globally. They will not be expecting a Scintilla update to decrease performance.
how about change property in the first line to fold.plaintext, so this will not affect existing app
Its called the "null" lexer, not the "text" or "plaintext" lexer so should not interpret the text.
An equivalent "indent" language was committed in [cc76b6].
Related
Commit: [cc76b6]
Not works as expected.
same examples:
RFC from IETF: http://www.ietf.org/rfc/rfc4122.txt
PEP from Python: https://raw.githubusercontent.com/python/peps/master/pep-0100.txt
Hi Zufu,
I did not try the Indent language yet, b/c I'm using Geany (for now). But just in case it helps you: an alternative, in Geany edior, you could make your own filetype/language, using the lexer of python or haskell or coffeescript (which fold based on indentation). It's not hard, that's what I did: https://www.geany.org/manual/current/index.html#creating-a-custom-filetype-from-an-existing-filetype
Hi Vic, I already use the attached LexNull in Notepad2, https://github.com/zufuliu/notepad2
Hi Zufu, I had no idea you have YOUR OWN text editor. I'm just a user