Community
    • Login

    How to make a comments area and minimize it?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    14 Posts 2 Posters 9.0k 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.
    • Artem  RomankoA
      Artem Romanko
      last edited by

      How to bring folding to php? What I need to change?

      1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • Artem  RomankoA
          Artem Romanko
          last edited by

          I don’t remember. But maybe is there any way to make it work.
          Just noticed that “case - break” cannot be folded too. Sad.

          1 Reply Last reply Reply Quote 0
          • Claudia FrankC
            Claudia Frank
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • Artem  RomankoA
              Artem Romanko
              last edited by

              v 6.9
              No this doesn’t work

              1 Reply Last reply Reply Quote 0
              • Claudia FrankC
                Claudia Frank
                last edited by Claudia Frank

                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 npp

                If latter is the case, it is working

                Image Alt

                Cheers
                Claudia

                1 Reply Last reply Reply Quote 0
                • Artem  RomankoA
                  Artem Romanko
                  last edited by Artem Romanko

                  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

                  1 Reply Last reply Reply Quote 0
                  • Claudia FrankC
                    Claudia Frank
                    last edited by

                    Yes, you are right. But it looks the standard php multiline comment works

                    <?php
                    /*
                        $a = true;
                    */
                    ?>
                    

                    Cheers
                    Claudia

                    1 Reply Last reply Reply Quote 0
                    • Artem  RomankoA
                      Artem Romanko
                      last edited by Artem Romanko

                      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)

                      1 Reply Last reply Reply Quote 0
                      • Claudia FrankC
                        Claudia Frank
                        last edited by

                        I’m not a php expert but couldn’t you use curly brackets?

                        1 Reply Last reply Reply Quote 0
                        • Artem  RomankoA
                          Artem Romanko
                          last edited by

                          Do you mean:
                          {
                          $a = true;
                          }

                          ? I think it slows down the code.

                          1 Reply Last reply Reply Quote 0
                          • Claudia FrankC
                            Claudia Frank
                            last edited by Claudia Frank

                            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

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