help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cperl-mode - how people outline their code?


From: LanX
Subject: Re: cperl-mode - how people outline their code?
Date: Fri, 23 Apr 2010 16:09:32 -0700 (PDT)
User-agent: G2/1.0

Hi Ilya

> So all I can suggest is for you people giving me suggestions how the
> USERS may want/need to add their own "extra" outline levels.  Given this
> information, I might be able to incorporate something into the CPerl's
> puny outline support...
>
> > Maybe he is reading a willing to update his mode to allow a variable
> > "cperl-outline-chunk-regexp"
>
> ... only if I know some examples of what people like to do.

I can only tell how I'm doing it, I'm not "the USERS" and I'm still
confused about the whishes of Terrence/Metaperl (hs-minor-mode simply
folds at all blocks "{"blocks"}" )

Chunks of code line  - normally but not necessarily paragraphs - get a
leading comment line like

---------------------------
sub do_data {

  #- fetching data
  open my $fh,"<","txt";
  $data=slurp $fh;

  #- processing data ...

  #- returning data ...
}
--------------------------

to be able to fold these with outline minor mode I add an extra hyphen
to distinguish these line comments from others.

(I don't think it's possible to design a regex that only folds single
comment lines on tops of code chunks.)


more folding on =pods would be nice, too.

But I'm not sure if outline or hide-show is the better choice.


If you want a more representative answer you should maybe ask at
perlmonks.org

Cheers
  Rolf


reply via email to

[Prev in Thread] Current Thread [Next in Thread]