Difference between revisions of "Editor: emacs"

From Dreamwidth Notes
Jump to: navigation, search
(Created page with 'Emacs is a very full-featured editor available for pretty much every operating system. Your installation should highlight Perl code correctly if you save your file with a <code>....')
 
(cperl, indentation)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 +
[[Category:Editors]]
 +
 
Emacs is a very full-featured editor available for pretty much every operating system. Your installation should highlight Perl code correctly if you save your file with a <code>.pl</code> extension.
 
Emacs is a very full-featured editor available for pretty much every operating system. Your installation should highlight Perl code correctly if you save your file with a <code>.pl</code> extension.
 +
 +
Emacs ships with two modes for Perl editing: a simple perl-mode and a more advanced cperl-mode. You should probably use cperl-mode unless you have a special reason not to; to do so, add <code>(defalias 'perl-mode 'cperl-mode)</code> to ~/.emacs. To indent using four spaces per level, add <code>(setq-default indent-tabs-mode nil)</code> and <code>(setq cperl-indent-level 4)</code> to your .emacs.

Latest revision as of 04:11, 10 June 2009


Emacs is a very full-featured editor available for pretty much every operating system. Your installation should highlight Perl code correctly if you save your file with a .pl extension.

Emacs ships with two modes for Perl editing: a simple perl-mode and a more advanced cperl-mode. You should probably use cperl-mode unless you have a special reason not to; to do so, add (defalias 'perl-mode 'cperl-mode) to ~/.emacs. To indent using four spaces per level, add (setq-default indent-tabs-mode nil) and (setq cperl-indent-level 4) to your .emacs.