I am asking an age old question. I did a super search and found some information in
Development Speed and Productivity. But mostly I have found nothing. My question is, "What text editor do you use for coding perl, and why do you use it to code perl?"
Let me lay out some ground rules here. I am not looking for an editor holy war here. I am not interested in whether one or the other is better. I am looking for features that editors have that make them useful for editing perl. I am not even looking for statements like
"vi is better because it is always installed on the box." On the emacs side, I am not interested whether Xemacs is better than Emacs or whether perl-mode is better than cperl-mode. I hope that any posts that attempt to extol the virtues of one editor OVER another are "--"ed.
A little background...
We have 15 to 20 programmers, about 5 to 10 sysadmins, and half a
dozen html developers. The html guys use Windows based EditPad and
WinCVS -- for one reason or another, they have found an easy learning
curve with those tools. The sysadmins generally use vi (we are using
Red Hat so "vi" is actually spelled "vim") and they use command line
cvs -- in their case, vi is always on the box, and "who would be caught
using an interface to cvs?" The programmers however are split. Sixty
percent use vim and the rest use emacs (although we have had the
occasional Nedit, CRiSP, or Microsoft IDE people). I am a firm
believer that you really need an extended editor that has minimum
features of:
- Multiple buffers to allow multiple files to be opened, or even viewed
at the same time.
- Copy/Cut/Paste Features (at least basic).
- Full featured Search/Replace for easy searching of text.
- Basic line/column numbering.
For obvious reasons, this rules out editors like notepad and pico.
I'm sure there are some that are some developers who are capable of
turning out lots of good work using pico and notepad, but experience
(managing and viewing the work habits of 20 to 30 developers) has
shown that people who use an extended editor such as emacs or vim and
know their editor well, tend to get more done.
As for myself, I do most of my editing in a terminal window. I am
currently using GNU Emacs 21.0.100.2 running in perl-mode with
global-font-lock-mode on (which means I get color syntax highlighting
in emacs through a telnet window -- yes, vim has had this for years).
I know vi and vim at least fairly well, but have found some rather
desirable features in using emacs.
- Excellent indentation model. Emacs actually reads syntax and
indents accordingly. Vim has some functionallity as well but is a
little less rigorous. Emacs has some trouble with indentation on
constructs like ${"x"} = 1; because it thinks ${ is a
special variable (you can fix it by $ {"x"} = 1;).
- Excellent syntax highlighting mode. (Vim is descent as well)
- Wonderful interface to CVS - ie commiting, updating, logging,
checking status (vc- commands)
- Very powerful searching and replacing using string or regex (so
does vim)
- Macro support (so does vim).
- Directory Edit mode (dired) allowing for file manipulation,
complex regex rename of multiple files, etc.
- Editting files across FTP (ange-ftp).
- perldb (interface to the perl debugger).
- Bookmarks
- Rectange copy/cut/paste/insert
- Extremely customizable (vim is too)
I love emacs. But I get the impression that many, if not a majority,
of people use vim. Larry uses vi from what I hear. So, what do you
use to code perl and why?
my @a=qw(random brilliant braindead); print $a[rand(@a)];
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.