• Login
Community
  • Login

how to clear or change this ?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
6 Posts 3 Posters 318 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.
  • S
    Sophie Cong
    last edited by Aug 2, 2023, 10:32 PM

    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

    P 1 Reply Last reply Aug 2, 2023, 10:42 PM Reply Quote 0
    • P
      PeterJones @Sophie Cong
      last edited by Aug 2, 2023, 10:42 PM

      @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.

      S 1 Reply Last reply Aug 3, 2023, 3:10 PM Reply Quote 3
      • S
        Sophie Cong @PeterJones
        last edited by Aug 3, 2023, 3:10 PM

        @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.

        M P 2 Replies Last reply Aug 3, 2023, 3:14 PM Reply Quote 0
        • M
          Michael Vincent @Sophie Cong
          last edited by Aug 3, 2023, 3:14 PM

          @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
          • P
            PeterJones @Sophie Cong
            last edited by PeterJones Aug 3, 2023, 3:16 PM Aug 3, 2023, 3:16 PM

            @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.

            S 1 Reply Last reply Aug 3, 2023, 5:55 PM Reply Quote 1
            • S
              Sophie Cong @PeterJones
              last edited by Aug 3, 2023, 5:55 PM

              @PeterJones Thank you for the explanation.

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