Skip to content

Instantly share code, notes, and snippets.

@nhunzaker
Created November 7, 2011 14:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nhunzaker/1345187 to your computer and use it in GitHub Desktop.
Save nhunzaker/1345187 to your computer and use it in GitHub Desktop.
Enable line numbering on the left-hand side in Emacs
;;;;;;;;;;;;;;;;;;;;;;;;;
;; Line Numbering
;;;;;;;;;;;;;;;;;;;;;;;;;
;; Note: I'm doing this in Emacs 24 on OSX
;; Swap line numbers using C-<f5>, you can change this of course
(autoload 'linum-mode "linum" "toggle line numbers on/off" t)
(global-set-key (kbd "C-<f5>") 'linum-mode)
;; Show all line numbering by default (you can turn this off if you would like)
(line-number-mode 1)
(linum-mode 1)
;; Adjust Spacing
(setq linum-format "%d ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment