tags:

views:

178

answers:

2

I enable them by pressing: M-x linum-mode. How can I "translate" that into my.emacs file in order to enable it automatically every time I open EMACS?

+11  A: 

Drop (global-linum-mode t) into your .emacs if you want it for every buffer. Otherwise, you can add a function to the appropriate hook of modes you're interested in to enable it for just that mode.


You should really read though the manual like I suggested in the last question of yours that I answered. ;)

Noufal Ibrahim
+1 for "RTFM"...always a good idea.
AJ
A: 

You can also put (line-number-mode 1) into your .emacs file. This way you can also have it be mode specific:

(defun my-c-mode-common-hook ()
  (line-number-mode 1))
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)

That way, it will only put the line numbers in if it's a C/C++ file.

LordOphidian