Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 2000 19:12:59 +0200
From:      Francesco Casadei <fcasadei@inwind.it>
To:        Erin <Kahn@deadbbs.com>
Cc:        questions@freebsd.org
Subject:   Re: perl/cgi Authorintg tools
Message-ID:  <20000922191259.B1550@goku.kasby>
In-Reply-To: <000201c0243a$df98a580$1375a8c0@deadbbs.com>; from Kahn@deadbbs.com on Thu, Sep 21, 2000 at 07:14:43PM -0700
References:  <000201c0243a$df98a580$1375a8c0@deadbbs.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 21, 2000 at 07:14:43PM -0700, Erin wrote:
> I am getting tired of using notepad and vi to do
> my authoring and editing of all my perl and .cgi
> scripts.
> 
> I have a 1500+ line perl script that has minor
> problems originating between the keyboard and
> the chair. It geting to be hard to track down
> these minor errors with notepad and/or vi.
> 
> What else is there?
> 
> 
> Thanks,
> 
> 
> 
> Erin
> 
> 
> mailto:kahn@deadbbs.com
> http://www.deadbbs.com
> http://www.fortenberry.net
> 
> 
> I think it's a beautiful day to go to the zoo and feed the ducks.
> To the lions.
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 
> end of the original message

Try Emacs. A brief list of features:
 * syntax coloring
 * on-the-fly expressions indenting
 * it shows you matching brackets while you're typing (e.g. when you
   type ')' emacs will rapidly move the cursor to the matching '('
   and then returns to the insertion point)
 * support for many languages: perl, c/c++, java, html, tex etc...
   (a very long list of major modes :-).
 * ...
 [long list of features snipped here]

You can find version 20.7 in the Ports Collection
(/usr/ports/editors/emacs20).

To enable syntax coloring put the string:

(global-font-lock-mode 1)

in $HOME/.emacs .

Now when you open a file whose filename ends with .pl emacs will load
perl-mode and will colour the syntax accordingly. Similarly if you
open .c, .h, .cc or .java files emacs will load cc-mode. If you open
.html or .sgml files emacs will load sgml-mode etc.. (you've got the
idea...).

To force a major mode type:

	M-x perl-mode  for Perl
   M-x cc-mode    for C, C++, Java
   M-x sgml-mode  for HTML/SGML
   M-x sh-mode    for shell scripts
   ...

To indent an expression put the cursor at the beginning of the
expression and type M-C-q (META+CTRL+q).

NOTE: syntax coloring (aka font locking) works only when you start
emacs under X. Auto-indenting works both under X or console.

		Francesco Casadei

P.S. Emacs is a large beast: it can be very difficult to learn! When
you don't know how it works you hate it and you wish you never heard
about it, but don't give up to learn because when you know how to use
it you love it!


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000922191259.B1550>