Community
    • Login

    How to get indent folding in plain text or user defined language?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 3 Posters 4.2k Views 2 Watching
    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.
    • henvu50H Offline
      henvu50
      last edited by henvu50

      When notepad++ language is set to python, you get a neat folding by indentation feature. How can I get that same feature to work in plain text or user defined language?

      I wouldn’t mind keeping notepad++ set to python language, but it highlights a bunch of words which is too distracting.

      1 Reply Last reply Reply Quote 0
      • henvu50H Offline
        henvu50
        last edited by

        Is there a way to fold text using characters, when language is set to python? I can currently fold based on indentation, but can’t using special characters.

        I need some kind of word processor or text editor that has powerful text folding features. Notepad++ is the best so far, but is still limited unfortunately.

        PeterJonesP 1 Reply Last reply Reply Quote 0
        • PeterJonesP Online
          PeterJones @henvu50
          last edited by

          @henvu50 ,

          folding by indentation feature. How can I get that same feature to work in plain text or user defined language?

          Folding by indentation happens in the Python lexer (and maybe a few of the others), but cannot be replicated using the User Defined Language system (which requires both open and close keywords or character sequences).

          Is there a way to fold text using characters, when language is set to python

          Not that I’m aware of; as far as I know, the Python lexer only does folding-by-indentation.

          It sounds like you have a circumstance where you want mulitple folding styles (indentation and character) that both work simultaneously. I don’t know of any of the built-in lexers that you could use/abuse to get that. To get something like that, I think you’d have to either write a lexer plugin or use one of the scripting plugins (for example, the PythonScript plugin) to access the Scintilla folding commands and do it yourself.

          1 Reply Last reply Reply Quote 1
          • henvu50H Offline
            henvu50
            last edited by henvu50

            I mean no disrespect to notepad++ with what I’m about to say. I love notepad++.

            I just discovered a new software called Sublime Text.

            • It allows folding of any text or code.
            • It literally has indentation folding that works right off the bat.

            Sublime text is a text and cold folding paradise, my god.

            I’m still using notepad++, but for folding of any kind, Sublime text is superior. The spell check works without any problems as well.

            Alan KilbornA 1 Reply Last reply Reply Quote 0
            • Alan KilbornA Offline
              Alan Kilborn @henvu50
              last edited by Alan Kilborn

              @henvu50 said in How to get indent folding in plain text or user defined language?:

              I just discovered a new software called Sublime Text.

              One thing you forgot to mention in your rave review of Sublime Text is that, unlike Notepad++, it is not zero-cost software.
              You are bound to purchase it if you want to use it.

              The spell check works without any problems as well.

              Notepad++ doesn’t have a spell check, so comparing it with Sublime Text on this point is apples and oranges.

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors