how to clear or change this ?
-
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.
-
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
☑ Nonechosen, 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.
-
@PeterJones said in how to clear or change this ?:
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
☑ Nonechosen, 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.
-
@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.
-
@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.
-
@PeterJones Thank you for the explanation.
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