Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

editor for indenting hashes of hashes of hashes

by princepawn (Parson)
on May 16, 2000 at 21:19 UTC ( [id://11895]=perlquestion: print w/replies, xml ) Need Help??

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

Emacs mode is rather weak when it comes to properly indenting several levels of nested hashes (even when I do manage to get commas out before the braces :-) ) Do you use any other editor under Unix for proper indentation It cant be an x-windows editor --- text only And I dont want to use Vi or any of its clones
  • Comment on editor for indenting hashes of hashes of hashes

Replies are listed 'Best First'.
Re: editor for indenting hashes of hashes of hashes
by pschoonveld (Pilgrim) on May 16, 2000 at 23:40 UTC
    Vim is the answer to most troubles. Available for almost all unices and even win32. Has a nice graphical interface if you want it. The ability to display multiple files in standard term mode. Regex's and all other forms of joy all for free.
Re: editor for indenting hashes of hashes of hashes
by ZZamboni (Curate) on May 16, 2000 at 22:07 UTC
    I use XEmacs. Emacs is ok too, but make sure you use cperl-mode and not the standard perl-mode. Cperl-mode has vastly improved support for good indentation, syntax highlighting, and a number of other things. I'm pretty sure cperl-mode is included in latest versions of XEmacs. If not, you can get it at ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs/.

    --ZZamboni

Re: editor for indenting hashes of hashes of hashes
by chromatic (Archbishop) on May 16, 2000 at 22:54 UTC
    If you're extremely lazy, you can just type them in as is, and use Data::Dumper to write them out to a file. It formats things very nicely.

    (I'm extremely lazy.)

Re: editor for indenting hashes of hashes of hashes
by perlmonkey (Hermit) on May 16, 2000 at 22:55 UTC
    I use and love Nedit, you can get it from www.nedit.org.

    It has some cool features like Emacs does, but coming from a windows background I found Nedit a lot easier to use because the hot-key commands were similar to standard windows utilities like DOS EDIT. But this is a hell of a lot more powerful that DOS EDIT.

    Also it has some really easy block highlighting/moving, syntax highlighting, auto indention, and a lot more features. It also has a macro language as does Emacs.
RE: editor for indenting hashes of hashes of hashes
by Russ (Deacon) on May 16, 2000 at 23:00 UTC
    The emacs guru I know (who is out for a few days with a broken foot) has rumored the existence of a perl interpreter in emacs (called e-perl, or something) to "replace" elisp.

    My face brightened considerably (since emacsen have never correctly handled Perl indentation), but I have never actually investigated (I usually hate to tinker with tools, and text editors are tools).

    Perl would be a much better Perl parser than lisp, don't you think?

    ;-)

    Russ

Re: editor for indenting hashes of hashes of hashes
by infoninja (Friar) on May 16, 2000 at 23:24 UTC
    I'm quite fond of FTE myself...handles indenting hashes of hashes of hashes of.... just fine, has good syntax highlighting. About the only problem I've had w/ FTE is that its auto-indent can get confused by long paths occasionally. I use it every day as my primary editor.
Re: editor for indenting hashes of hashes of hashes
by IndyZ (Friar) on May 17, 2000 at 00:24 UTC
    I personally love jed. I can't remember where it's homepage is, but a quick search on freshmeat.net will no doubt turn it up.

    It has syntax highlighting for every popular program language (and even some that I thought we dead). As an added bonus, the current version works under X, the console, and even win32.

    Brian

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found