• Login
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.
  • C
    Claudia Frank
    last edited by Mar 23, 2016, 3:37 PM

    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
    • A
      Artem Romanko
      last edited by Mar 23, 2016, 3:57 PM

      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
      • C
        Claudia Frank
        last edited by Mar 23, 2016, 4:13 PM

        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
        • A
          Artem Romanko
          last edited by Mar 23, 2016, 5:38 PM

          v 6.9
          No this doesn’t work

          1 Reply Last reply Reply Quote 0
          • C
            Claudia Frank
            last edited by Claudia Frank Mar 23, 2016, 5:54 PM Mar 23, 2016, 5:53 PM

            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
            • A
              Artem Romanko
              last edited by Artem Romanko Mar 23, 2016, 6:13 PM Mar 23, 2016, 6:12 PM

              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
              • C
                Claudia Frank
                last edited by Mar 23, 2016, 6:21 PM

                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
                • A
                  Artem Romanko
                  last edited by Artem Romanko Mar 23, 2016, 6:34 PM Mar 23, 2016, 6:32 PM

                  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
                  • C
                    Claudia Frank
                    last edited by Mar 23, 2016, 7:12 PM

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

                    1 Reply Last reply Reply Quote 0
                    • A
                      Artem Romanko
                      last edited by Mar 23, 2016, 7:46 PM

                      Do you mean:
                      {
                      $a = true;
                      }

                      ? I think it slows down the code.

                      1 Reply Last reply Reply Quote 0
                      • C
                        Claudia Frank
                        last edited by Claudia Frank Mar 23, 2016, 7:53 PM Mar 23, 2016, 7:52 PM

                        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
                        13 out of 14
                        • First post
                          13/14
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors