Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

syntax color coding

by hsfrey (Beadle)
on Apr 01, 2012 at 23:18 UTC ( [id://962942]=perlquestion: print w/replies, xml ) Need Help??

hsfrey has asked for the wisdom of the Perl Monks concerning the following question:

I'm printing out javascript code from a perl program, so I have long multi-line quote strings containing javascript.

My editor, editplus3, doesn't recognize that the continuation lines are part of the quote, so it tries to syntax color-code them as though they were perl code. I'd rather they were colored as quote strings.

Is there an editor that will syntax color-code perl multi-line quote strings as quote strings?

Replies are listed 'Best First'.
Re: syntax color coding
by tobyink (Canon) on Apr 02, 2012 at 06:57 UTC

    SciTE certainly can cope with multi-line strings (and heredocs).

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Re: syntax color coding
by johngg (Canon) on Apr 02, 2012 at 09:31 UTC

    I use nedit which can also correctly highlight multi-line quoted strings.

    Cheers,

    JohnGG

Re: syntax color coding
by Anonymous Monk on Apr 02, 2012 at 01:05 UTC

      Padre (well, Scintilla) knows to syntax-color double-quoted here-documents. It looks (somewhat) like this:

      $foo = <<PERL;
      bar is $bar
      PERL


      $baz = "blurb";

      cperl for Emacs handles multiline quoted strings and HERE docs quite right.

        cperl for Emacs handles multiline quoted strings and HERE docs quite right.

        That is kinda why I linked to it :)

        I guess I need to work on my sarcasm face

Re: syntax color coding
by herveus (Prior) on Apr 02, 2012 at 15:42 UTC
    Howdy!

    Notepad++ got it right.

    yours,
    Michael

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://962942]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-18 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found