Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to auto run the `M-x linum-mode` to display line number

Tags:

emacs

I have installed the package to display line number in emacs. However, each time I have to manually call M-x linum-mode to trigger this function.

Is there a way that I can modify my .emacs file and make it called automatically?

Thank you

; .emacs
(require 'linum)
like image 969
q0987 Avatar asked Sep 09 '25 16:09

q0987


1 Answers

It should be sufficient to add

(global-linum-mode 1)

to your .emacs file.

Then linum-mode will start as soon as you open a file.

like image 93
alexurba Avatar answered Sep 13 '25 16:09

alexurba