Community
    • Login

    Folding based on Indent?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 8.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Lee GriffithsL
      Lee Griffiths
      last edited by

      Hi,

      How do I get Notepad++ to fold based on the indent level?

      I noticed Python and YAML will fold based on indent level, but they have the side-effect of syntax colouring things incorrectly for the files I’m working on, so I don’t find them usable.

      I tried making a new language definition, but couldn’t figure out how to make it fold based on whitespace/indent level like YAML and Python do. The boxes seem to ignore whitespace, and expect to have an “end” delimiter which I guess this doesn’t have.

      I even tried looking at YAML and Python sections in the %AppData%\Roaming\Notepad++\langs.xml file, but it doesn’t seem to have anything about indent that I could copy.

      Any help?

      Thanks.

      1 Reply Last reply Reply Quote 1
      • Bortre IkariamB
        Bortre Ikariam
        last edited by

        Hi. I found your post as I was googling for the same thing. I read on Stack Overflow that it can’t be done. It does it for Python and YAML thanks to Scintilla, which is the editor used within Notepad++ and which recognizes those two languages.

        http://stackoverflow.com/questions/7246004/configure-notepad-to-use-indentation-based-code-folding

        I’m using indentation to describe a complex array in PHP. For my purposes, the Python style works ok. On my computer, the YAML language makes all the text red. I hope one of the two works for you.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors