PDA

View Full Version : emacs Question



perlsyntax
September 13th, 2008, 10:45 PM
How do i install this and here the links and i am very new with emacs



http://search.cpan.org/~yewenbin/Emacs-PDE-0.2.16/lib/Emacs/PDE.pm

shifty2
September 13th, 2008, 11:33 PM
Emacs is based around packages such as the one you linked to and the way of installing them is almost always the same - as the link suggests, add the following to you .emacs


(add-to-list 'load-path "/path/to/pde/")
(load "pde-load")
If you are new to emacs I would strongly suggest going through the tutorial (Type C-h t) and looking through the emacs wiki (www.emacswiki.org) both contain invaluable information.

perlsyntax
September 20th, 2008, 01:46 PM
Do i have to make a .emacs file if i am right?:(

nvteighen
September 20th, 2008, 03:08 PM
Do i have to make a .emacs file if i am right?:(
It depends. If you already have customized something, it surely exists... If not, just create a text file in you home directory with the contents shifty2 told you.

perlsyntax
September 20th, 2008, 03:22 PM
I just lost on how to make a file with my emacs in my home dir.

nvteighen
September 20th, 2008, 03:27 PM
I just lost on how to make a file with my emacs in my home dir.
Do you know how to use Emacs? It's not that difficult if you read the tutorial (C-h t).

For you to know, to create a file do C-x C-f, type the filename (opening and creating a file in Emacs is the same thing) and then save using C-x C-s.

perlsyntax
September 20th, 2008, 04:31 PM
that all i do and where do i find the perl tools?

monkeyking
September 22nd, 2008, 12:38 AM
You should download and unpack the pde file
http://search.cpan.org/CPAN/authors/id/Y/YE/YEWENBIN/Emacs-PDE-0.2.16.tar.gz

then create a .emacs file
and put your 2 lines in it.

I haven't coded much perl in last year, but I still have these in my .emacs.



;; Use cperl-mode instead of the default perl-mode
(add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))



(add-hook 'cperl-mode-hook 'n-cperl-mode-hook t)
(defun n-cperl-mode-hook ()
(setq cperl-indent-level 2)
(setq cperl-continued-statement-offset 0)
(setq cperl-extra-newline-before-brace t)
(set-face-background 'cperl-array-face "wheat")
(set-face-background 'cperl-hash-face "wheat")
)

(setq default-frame-alist '(
(font . "6x10")
(cursor-color . "gray25")
(background-color . "white")
(foreground-color . "black")
(vertical-scroll-bars . left)
(top . 0) (left . 0)
(width . 98) (height . 60)
)
)


emacs is a nice editor,
but you should set it up.
matching paranthesis, funky syntax, block mode and so on.

Find some long .emacs file somewhere on the net.
and play around with it.

I can give you mine if you want.

good luck