Skip to content

Instantly share code, notes, and snippets.

@ramhiser
Created December 8, 2011 23:26
Show Gist options
  • Save ramhiser/1449228 to your computer and use it in GitHub Desktop.
Save ramhiser/1449228 to your computer and use it in GitHub Desktop.
My .emacs File
(require 'mouse)
(xterm-mouse-mode t)
(defun track-mouse (e))
;; Save all backup file in this directory.
(setq backup-directory-alist `(("." . "~/.emacs_backups/")))
(setq backup-by-copying t)
;; Tabs yields 2 spaces
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)
(setq indent-line-function 'insert-tab)
;; Show column number on the bottom status bar.
(setq column-number-mode t)
;; Add color-theme to emacs to get the Solarized theme to work.
;; This should not be an issue once emacs 24 is installed.
(add-to-list 'load-path "~/.emacs.d/color-theme-6.6.0/")
(require 'color-theme)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(color-theme-hober)))
;; Use the Solarized color theme
;; git-clone'd from:
;; https://github.com/sellout/emacs-color-theme-solarized
(add-to-list 'load-path "~/.emacs.d/emacs-color-theme-solarized/")
(require 'color-theme-solarized)
;; Use the tangotango color theme
;; I found this theme from the Org-mode listing of colors here:
;; http://orgmode.org/worg/org-color-themes.html
;; A blog post about the 'tangotango' theme can be found here:
;; http://blog.nozav.org/post/2010/07/12/Updated-tangotango-emacs-color-theme
;; Also, here is the github repository link (which I have cloned into ~/.emacs.d/):
;; https://github.com/juba/color-theme-tangotango
(add-to-list 'load-path "~/.emacs.d/color-theme-tangotango/")
(require 'color-theme-tangotango)
;; Use Emacs Speaks Statistics (ESS)
;; To install ESS, do this:
;; cd ~/.emacs.d
;; git clone https://github.com/emacs-ess/ESS.git
(add-to-list 'load-path "~/.emacs.d/ESS/lisp/")
(require 'ess-site)
;; Turns off the 'smart' underscore in ESS
;; If on, this feature types " <- " if the underscore is pressed.
(ess-toggle-underscore nil)
;; To use org-mode. This is from David O'Toole's Org tutorial:
;; http://orgmode.org/worg/org-tutorials/orgtutorial_dto.html
(require 'org-install)
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
;; We begin in org-mode by default with the following file types:
;; *.org
;; README
;; README.md
;; TODO
;; NOTES
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(add-to-list 'auto-mode-alist '("README$" . org-mode))
(add-to-list 'auto-mode-alist '("README.md$" . org-mode))
(add-to-list 'auto-mode-alist '("TODO$" . org-mode))
(add-to-list 'auto-mode-alist '("NOTES$" . org-mode))
;; Agenda files for Org-mode
;; When the agenda mode is run, these files are queried for their TODO tasks.
;; (setq org-agenda-files (list "~/todo/work.org"
;; "~/todo/school.org"
;; "~/todo/home.org"))
;; Standard Orgmode-to-LaTeX export commands
;; I obtained the below commands from the official Org-mode site.
;; http://orgmode.org/worg/org-tutorials/org-latex-export.html
;; Detailed customizations can be obtained with directions from the same link.
(require 'org-latex)
(unless (boundp 'org-export-latex-classes)
(setq org-export-latex-classes nil))
(add-to-list 'org-export-latex-classes
'("article"
"\\documentclass{article}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment