in reply to Re: Pretty Print (perltidy integration)
in thread Pretty Print

> B) perltidy can also produce highlighted code, but startup is slow and would cause a lag

> C) patching perltidy to run in a server mode might be a solution.

FWIW:

Actually no patch needed, this code from Perl::Tidy is very fast after initialization (which can take 1-2 secs)

use Perl::Tidy; # ... # run in a loop reading source and outputting dest my $error = Perl::Tidy::perltidy( argv => $argv, source => \$source_string, destination => \$dest_string, stderr => \$stderr_string, errorfile => \$errorfile_string, + );

Indenting some lines on laptop took under 0.05 sec and own formatters for "special" html are easily implemented.

(trying to implement a so called "asynchronous process" interface for emacs now)

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!