~:: kalyan ::~

January 27, 2009

emacs tweak

Filed under: emacs, Linux, Script — Tags: — skalyanasundaram @ 8:36 pm

If you are working on a perl file and using emacs then emacs can really help. By default the perl-mode is loaded. Thats bit old I guess. Instead use cperl-mode which is much more improved than the perl-mode. With the cperl-mode you can get

  • Electric mode, its when you type if it automatically generate if () {}…
  • Better font-lock mode for perl
  • Help. Keep your cursor on some keyword for example use after a few seconds the minibuffer will show the help of use operator.

So make sure to replace the perl-mode by cperl-mode by doing the following in your .emacs

(defalias 'perl-mode 'cperl-mode)
and also load all the functionality by,
(setq cperl-hairy t)

Apart from this I also use flymake-mode which compiles your program as you type and mark it when there
is an error found. Load the file,
(load "~/.emacs.d/flymake.el") and enable the flymake mode.

I also see this flymake can work for c,c++,java, but haven't tried that. I also see some php extensions.
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: