Menu

#1174 Folding for plain text based on indentation

Committed
closed
5
2018-09-16
2017-01-29
Zufu Liu
No

Folding for plain text based on indentation

1 Attachments

Discussion

  • Neil Hodgson

    Neil Hodgson - 2017-01-29

    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.

     
  • Zufu Liu

    Zufu Liu - 2017-01-30

    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.

     
  • Neil Hodgson

    Neil Hodgson - 2017-01-30

    Existing applications will often have 'fold' set globally. They will not be expecting a Scintilla update to decrease performance.

     
  • Zufu Liu

    Zufu Liu - 2017-01-31

    how about change property in the first line to fold.plaintext, so this will not affect existing app

     
  • Neil Hodgson

    Neil Hodgson - 2017-02-01

    Its called the "null" lexer, not the "text" or "plaintext" lexer so should not interpret the text.

     
  • Neil Hodgson

    Neil Hodgson - 2017-03-21
    • labels: --> scintilla, lexer, indent, folder
    • status: open --> closed
    • Group: Completed --> Committed
     
  • Neil Hodgson

    Neil Hodgson - 2017-03-21

    An equivalent "indent" language was committed in [cc76b6].

     

    Related

    Commit: [cc76b6]

  • Zufu Liu

    Zufu Liu - 2017-04-11

    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

     
    • Vic

      Vic - 2018-09-14

      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

       
      • Zufu Liu

        Zufu Liu - 2018-09-16

        Hi Vic, I already use the attached LexNull in Notepad2, https://github.com/zufuliu/notepad2

         
        • Vic

          Vic - 2018-09-16

          Hi Zufu, I had no idea you have YOUR OWN text editor. I'm just a user

           

Log in to post a comment.

MongoDB Logo MongoDB