Community
    • Login

    how to clear or change this ?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 3 Posters 317 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.
    • Sophie CongS
      Sophie Cong
      last edited by

      how to change or clear this ?
      I don’t know how to call this, but it gives you the options to show/hide some texts.Screenshot 2023-08-02 163057.png

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Sophie Cong
        last edited by

        @Sophie-Cong ,

        It’s called “code folding” – it’s a feature of each individual language lexer (the component of Notepad++ that handles code coloring / syntax highlighting, which has separate rules depending on whether your file is C++, HTML, JSON, or what have you)

        The Settings > Preferences > Margins/Border/Edge allow you to change the symbol used, or to turn off there being a code-folding symbol at all (though even with ☑ None chosen, the View menu folding commands still work.

        As for influencing where those occur: it’s defined by each language’s lexer, so is not customizable.

        Sophie CongS 1 Reply Last reply Reply Quote 3
        • Sophie CongS
          Sophie Cong @PeterJones
          last edited by

          @PeterJones said in how to clear or change this ?:

          @Sophie-Cong ,

          It’s called “code folding” – it’s a feature of each individual language lexer (the component of Notepad++ that handles code coloring / syntax highlighting, which has separate rules depending on whether your file is C++, HTML, JSON, or what have you)

          The Settings > Preferences > Margins/Border/Edge allow you to change the symbol used, or to turn off there being a code-folding symbol at all (though even with ☑ None chosen, the View menu folding commands still work.

          As for influencing where those occur: it’s defined by each language’s lexer, so is not customizable.

          Thanks,Peter, so how do I adjust this ? for example, now it spans from line 1 to line 10,but I need it to span from line 1 to line 5 only. my document type is sql.

          Michael VincentM PeterJonesP 2 Replies Last reply Reply Quote 0
          • Michael VincentM
            Michael Vincent @Sophie Cong
            last edited by

            @Sophie-Cong said in how to clear or change this ?:

            it spans from line 1 to line 10,but I need it to span from line 1 to line 5 only

            You don’t. Code folding is implemented by the parser for your language. So maybe you could rewrite your query a different way, or maybe there is not a possible “fold” at that position that could be folded.

            Perhaps show your code would be a little more helpful.

            Cheers.

            1 Reply Last reply Reply Quote 1
            • PeterJonesP
              PeterJones @Sophie Cong
              last edited by PeterJones

              @Sophie-Cong said in how to clear or change this ?:

              Thanks,Peter, so how do I adjust this ? for example, now it spans from line 1 to line 10,but I need it to span from line 1 to line 5 only. my document type is sql.

              That’s defined by the SQL lexer. I am not an SQL expert, but I would assume you would need to define something that would be considered an SQL “block”, because the code folding usually happens on “blocks”.

              For example, in C/C++, a block is often defined by the opening to closing curly braces, so it would fold on

              for(int i=0; i<10; i++) {
              ...
              }
              

              I don’t know what all the SQL language considers a block, and whether there are edge cases where the official definition of a block is different from what the lexer/syntax highlighter considers a block.

              But it’s completely dependent on the code you have written in your SQL to determine what is considered a block.

              Sophie CongS 1 Reply Last reply Reply Quote 1
              • Sophie CongS
                Sophie Cong @PeterJones
                last edited by

                @PeterJones Thank you for the explanation.

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