Category: | Miscellaneous |
Author/Contact Info | clemburg |
Description: | Ever tried outline-mode in an emacs? It works with Perl, too. Just put this code into your .emacs, or execute it from buffer *scratch*. Then do M-x perl-outline-mode after you opened the Perl code file. You can then expand and contract subroutines (with C-c @ C-t to contract all, C-c @ C-a to expand all, C-c @ C-d to contract a function, C-c @ C-s to expand it). |
(defun perl-outline-mode () "set customized outline minor mode for Perl" (interactive) (setq outline-regexp "sub") (outline-minor-mode)) Update: This works even better: (defun perl-outline-mode () "set customized outline minor mode for Perl" (interactive) (setq outline-regexp "#!.\\|\\(pac\\)kage\\|sub\\|\\(=he\\)ad\\|\\(=po\\)d") (outline-minor-mode)) |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Emacs outline mode for Perl
by stefan k (Curate) on Feb 19, 2001 at 21:47 UTC | |
Re: Emacs outline mode for Perl
by petral (Curate) on Feb 21, 2001 at 01:22 UTC | |
Re: Emacs outline mode for Perl
by TheoPetersen (Priest) on Feb 19, 2001 at 21:52 UTC | |
by clemburg (Curate) on Feb 19, 2001 at 21:56 UTC | |
Re: Emacs outline mode for Perl
by metaperl (Curate) on Apr 16, 2010 at 14:06 UTC |
Back to
Code Catacombs