Skip to content

Instantly share code, notes, and snippets.

@johnjosephhorton
Created August 21, 2012 17:39
Show Gist options
  • Save johnjosephhorton/3417706 to your computer and use it in GitHub Desktop.
Save johnjosephhorton/3417706 to your computer and use it in GitHub Desktop.
John Horton's .emacs file
(add-to-list 'load-path "~/.emacs.d/")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/ess")
;; LaTeX stuff
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
;; browse the kill ring
(load "browse-kill-ring.el" nil t t)
(when (require 'browse-kill-ring nil 'noerror)
(browse-kill-ring-default-keybindings))
(add-hook 'TeX-mode-hook (lambda ()
(TeX-fold-mode 1)
(reftex-mode t)
(flyspell-mode t)
(setq flyspell-sort-corrections nil)
(turn-on-auto-fill)))
;; turns off spell checking on Sweave
(add-to-list 'ispell-skip-region-alist '("^<<.*>>=" . "^@"))
;; turns on special tab switching:
;; http://emacs-fu.blogspot.com/2009/02/switching-buffers.html
(iswitchb-mode t)
(require 'ssh)
(add-to-list 'load-path (expand-file-name "~/elisp/org-mode/lisp"))
(add-to-list 'auto-mode-alist '("\\.\\(org\\ |org_archive\\|txt\\)$" . org-mode))
(require 'org-install)
(require 'org-habit)
(require 'org-exp-bibtex)
(require 'ess-site)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
;; Paul recommended key-re-mapping
(global-set-key "\C-o" 'other-window)
;; Get rid of menus
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(ido-mode)
;; set the port for postgresql connection to odw
(setq sql-postgres-options (list "-p 63333"))
(set-background-color "black")
(set-foreground-color "white")
;; clojure stuff
(add-to-list 'load-path "~/opt/clojure-mode")
(require 'clojure-mode)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inferior-lisp-program "java -cp /home/john/opt/clojure/clojure.jar clojure.main")
'(inhibit-startup-screen t)
)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(org-babel-do-load-languages
(quote org-babel-load-languages)
(quote ((emacs-lisp . t)
(dot . t)
(ditaa . t)
(R . t)
(python . t)
(ruby . t)
(gnuplot . t)
(clojure . t)
(sh . t)
(ledger . t)
(org . t)
(sql . t)
(plantuml . t)
(latex . t))))
; Do not prompt to confirm evaluation
; This may be dangerous - make sure you understand the consequences
; of setting this -- see the docstring for details
(setq org-confirm-babel-evaluate nil)
;; capture
(setq org-default-notes-file "/home/john/Dropbox/notes.org")
(define-key global-map "\C-cc" 'org-capture)
;; ESS stuff
(setq ess-ask-for-ess-directory nil)
(setq ess-local-process-name "R")
(setq ansi-color-for-comint-mode 'filter)
;; advances the buffer http://www.kieranhealy.org/blog/archives/2009/10/12/make-shift-enter-do-a-lot-in-ess/
(setq comint-scroll-to-bottom-on-input t)
(setq comint-scroll-to-bottom-on-output t)
(setq comint-move-point-for-output t)
;; More Paul Stuff
; show column numbers
(setq column-number-mode t)
;; NO sound
(setq visible-bell t)
; highlight corresponding parens
(require 'paren)
(show-paren-mode 1)
; fix meta-g to be goto line
(global-set-key "\M-g" 'goto-line)
;; Make all "yes or no" prompts show "y or n" instead
(fset 'yes-or-no-p 'y-or-n-p)
(setq fill-column 80)
;; Display clock
(display-time)
;; markdown mode
(autoload 'markdown-mode "markdown-mode.el" "Major mode for editing Markdown files" t)
(setq auto-mode-alist (cons '("\\.md" . markdown-mode) auto-mode-alist))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment