How to make a comments area and minimize it?
-
Hello@Artem–Romanko,
I assume you are talking about folding and this depends on the language you selected.
By the given example and a selected language c++, it would be possible to fold the comment.Cheers
Claudia -
How to bring folding to php? What I need to change?
-
This is part of the lexer, so it seems that php lexer doesn’t have this functionality or
it was disabled by the lexer. Did you ever use this functionality with php?
If so, in which npp version?Cheers
Claudia -
I don’t remember. But maybe is there any way to make it work.
Just noticed that “case - break” cannot be folded too. Sad. -
As php lexer is based on html lexer I tried
//{<> $a = true; //}</>
which seems to work.
Don’t know if this is ok for you?Cheers
Claudia -
v 6.9
No this doesn’t work -
What excatly do you mean by
No this doesn’t work
No = this is working but not a solution for me or
No = this doesn’t work in nppIf latter is the case, it is working
Cheers
Claudia -
Sorry, but you’re doing this in the wrong way.
In PHP file construction that you wrote leads to displaying this in the browser:
//{<>
$a = true;
//</>
This is NOT the comments.Take a look what I have, please:
http://snag.gy/VKK2S.jpg -
Yes, you are right. But it looks the standard php multiline comment works
<?php /* $a = true; */ ?>
Cheers
Claudia -
This not what I want. I want to define something like regions and then fold it.
And unfortunately Notepad++ doesn’t have an oportunity to combine pre-defined language with user-defined language.
(user-defined language can help me, but I need to move all php syntax with loosing some features) -
I’m not a php expert but couldn’t you use curly brackets?
-
Do you mean:
{
$a = true;
}? I think it slows down the code.
-
Yes, that’s what I meant and as said, I’m no expert.
Why do you think it makes code execution slower?
And if it does, is it really notably slower?
You could also use something like { //region comment start } // region comment end
and when it goes to production delete those lines.One other option, which just right now comes into to my mind,
might be to use hide lines (ALT+H) (view menu).
I don’t like it because you need to take care that you don’t do nested hidings - maybe you like it?Cheers
Claudia