Community
    • Login

    Ask for support Perl5 new version & Perl6

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 3.0k Views 2 Watching
    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.
    • abelfourierA Offline
      abelfourier
      last edited by

      Hi,
      Seems Notepad++ only support Perl5.8, for example: “print” is a keyword, but “say” is not.
      “say” is available since Perl5.10 ( http://perldoc.perl.org/functions/say.html ).
      Perl6 is not supported also.

      Does Notepad++ has a plan to fix this? OR
      Can I add keyword into notepad++ myself? How?
      NEED FOR HELP. Thanks!

      abelfourier@hotmail.com

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP Online
        PeterJones
        last edited by PeterJones

        To add a keyword yourself to syntax highlighting, use Settings > Style Configurator > Language = Perl > Style = INSTRUCTION WORD > User-defined keywords = say, then Save & Close.

        If you also want to have auto-completion know “say”, edit Program Files (or Program Files (x86) for 32bit on 64bit win) ...\Notepad++\plugins\APIs\perl.xml, and add the “say” keyword alphabetically in the list, as shown. (You may have to restart NPP for this change to take effect.)

        After turning on auto-completion (Settings > Preferences > Auto-Completion > ☑ Enable auto-completion on each input), “say” will show up in the list of available words

        As far as Perl6: you could just add keywords on top of Perl5… but some argue it’s a whole different language, and should thus get its own lexer. I don’t know if there’s a Perl6 lexer for Scintilla yet, but it’s definitely not yet included with the Scintilla that NPP uses. Alternatively, if you don’t need the complex aspects of the syntax highlighting, you might be able to get away with a User Defined Language (UDL) thru Language > Define Your Language. You can see the UDL 2.1 documentation at http://ivan-radic.github.io/udl-documentation/.

        [update: added menu path to auto-completion settings]

        1 Reply Last reply Reply Quote 1
        • abelfourierA Offline
          abelfourier
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • PeterJonesP Online
            PeterJones @abelfourier
            last edited by

            To future readers:

            Scintilla eventually added a separate Raku lexer, and Notepad++ v8.6.6 and newer have the lexer enabled

            1 Reply Last reply Reply Quote 1

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