Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: combining emacs' cperl-mode formatting with Perltidy

by LanX (Saint)
on Oct 20, 2014 at 12:58 UTC ( [id://1104430]=note: print w/replies, xml ) Need Help??


in reply to Re: combining emacs' cperl-mode formatting with Perltidy
in thread combining emacs' cperl-mode formatting with Perltidy

Sure but I don't want the formatting to flip flop between two stiles...

Like the column where the comment starts...

Maybe one first step is to write a perltidy config parser which translates to emacs settings.

Another one would be a perltidy background demon to avoid the start overhead.

I should have mentioned that emacs is more line oriented while perltidy processes the whole file...

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)

  • Comment on Re^2: combining emacs' cperl-mode formatting with Perltidy

Replies are listed 'Best First'.
Re^3: combining emacs' cperl-mode formatting with Perltidy
by duelafn (Parson) on Oct 20, 2014 at 13:14 UTC

    Will they do that much fighting even if they are configured differently? I don't think cperl-mode changes indentation just by typing and certainly not anything further than the current line... at least I don't see anything in my cperl config that disables any such things. cperl is happy to allow me to edit a line or comment that it thinks in not properly aligned without changing the alignment. (that's actually a thing that drives me crazy in some other modes - they change the alignment when I type a paren or semi-colon.)

    Good Day,
        Dean

      As I said, there is an inline option for comment start (which might be a localized global variable)

      You can set up indent on return.

      You have indent region which is hooked in my config to closed curlies.

      You can set up the bracing style, like for if/else.

      So while the default is quite passive, there are many interactive features.

      (all options named from memory and most certainly not accurate)

      Cheers Rolf

      (addicted to the Perl Programming Language and ☆☆☆☆ :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2026-05-13 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.