Community
    • Login

    PowerShell language multiline strings

    Scheduled Pinned Locked Moved General Discussion
    7 Posts 3 Posters 5.9k 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.
    • Gerard KorthagenG
      Gerard Korthagen
      last edited by

      Hi,

      Is it possible to implement multiline strings for the language PowerShell?
      $variable = @"start
      multiline string
      end "@

      Thnx.

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

        Hello Gerard-Korthagen,

        this feature needs to be addressed here.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • dailD
          dail
          last edited by

          This was recently implemented in v6.8.8

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

            Hello dail,

            does this mean npp developers do enhance/modify scintilla lexers?
            I always thought this has to be done by scintilla devs themself.
            I know scintilla is open source and there is a good reason for Don and
            all the other contributors to make changes to enhance npps functionality.
            Basically what I want to know is if we can ask npp devs for
            lexer addition/changes.

            Thank you for your help.
            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            • dailD
              dail
              last edited by dail

              does this mean npp developers do enhance/modify scintilla lexers?

              In general, no :)

              I always thought this has to be done by scintilla devs themself.

              That is still the case.

              The reason the multi-line string is now supported is that it was available in Scintilla’s PowerShell lexer, but Notepad++ wasn’t “wired” up to use it. It was as easy as adding this line to the stylers xml file:

              <WordsStyle name="COMMENT STREAM" styleID="13" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
              

              The lexer would internally set that string to a styleID of 13, but without this line that style was using to the default style.

              1 Reply Last reply Reply Quote 0
              • dailD
                dail
                last edited by dail

                I guess I should also state that this is only for the default theme. The other themes are still missing this, but adding this line into the other themes under the “powershell” LexerType and giving it an appropriate color will allow it to show up with other themes.

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

                  Thank you very much for clarification.
                  Unfortunattely this means I need to be more careful
                  about the topic “what needs to be done by scintilla” and
                  what not. ;-)

                  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