Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Ask for support Perl5 new version & Perl6

    Help wanted · · · – – – · · ·
    2
    3
    2221
    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.
    • abelfourier
      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

      1 Reply Last reply Reply Quote 0
      • PeterJones
        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
        • abelfourier
          abelfourier last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright © 2014 NodeBB Forums | Contributors