Created
January 13, 2014 16:13
-
-
Save fipar/8402966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; show matching parenthesis | |
(show-paren-mode 1) | |
;; evil mode always on so I can keep using the vim shortcuts I know | |
(evil-mode 1) | |
(add-to-list 'load-path "/Users/fernandoipar/.emacs.d/") | |
;; logito, pcache, tabulated list, gh-ghist, required by gist | |
(require 'logito) | |
(require 'pcache) | |
(require 'tabulated-list) | |
;; enable auto completion | |
(require 'auto-complete-config) | |
(add-to-list 'ac-dictionary-directories "/Users/fernandoipar/.emacs.d//ac-dict") | |
(add-to-list 'ac-modes 'go-mode) | |
(add-to-list 'ac-modes 'php-mode) | |
(ac-config-default) | |
(add-to-list 'load-path "~/.emacs.d/gh.el") | |
(require 'gh-gist) | |
(add-to-list 'load-path "~/.emacs.d/gist.el") | |
(require 'gist) | |
;; 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)) | |
;; el-get | |
(add-to-list 'load-path "~/.emacs.d/el-get/el-get") | |
(unless (require 'el-get nil 'noerror) | |
(with-current-buffer | |
(url-retrieve-synchronously | |
"https://raw.github.com/dimitri/el-get/master/el-get-install.el") | |
(let (el-get-master-branch) | |
(goto-char (point-max)) | |
(eval-print-last-sexp)))) | |
(el-get 'sync) | |
;; elpa | |
;;; This was installed by package-install.el. | |
;;; This provides support for the package system and | |
;;; interfacing with ELPA, the package archive. | |
;;; Move this code earlier if you want to reference | |
;;; packages in your .emacs. | |
; (when | |
; (load | |
; (expand-file-name "~/.emacs.d/elpa/package.el")) | |
; (package-initialize)) | |
(load (expand-file-name "~/.emacs.d/elpa/package.el")) | |
(require 'package) | |
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "http://marmalade-repo.org/packages/") | |
("melpa" . "http://melpa.milkbox.net/packages/"))) | |
(package-initialize) | |
;; metapost-mode+ | |
(require 'metapost-mode+) | |
;; yaml mode | |
(setq load-path (cons "~/.emacs.d/yaml-mode/yaml-mode.el" load-path)) | |
;;; Org-mode | |
(setq load-path (cons "~/src/org-mode/lisp" load-path)) | |
(setq load-path (cons "~/src/org-mode/contrib/lisp" load-path)) | |
(require 'org-install) | |
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) | |
(add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when global-font-lock-mode is on | |
(global-set-key "\C-cl" 'org-store-link) | |
(global-set-key "\C-ca" 'org-agenda) | |
(global-set-key "\C-cb" 'org-iswitchb) | |
; agenda files | |
(setq org-agenda-files '("~/Todo.org" "~/Journal.org" "~/Notes.org")) | |
; default target for capture | |
(setq org-default-notes-file "~/Notes.org") | |
(define-key global-map "\C-cc" 'org-capture) | |
(defun my-after-load-org () | |
(add-to-list 'org-modules 'habits 'org-timer)) | |
;; todo states | |
(setq org-todo-keywords | |
'((sequence "TODO" "|" "DONE" ))) | |
;; track completion time | |
(setq org-log-done 'time) | |
;; add notes | |
(setq org-log-done 'note) | |
;; keep the agenda simple | |
(setq org-agenda-span 'day) | |
;; capture templates | |
(setq org-capture-templates | |
'(("t" "Todo" entry (file+headline "~/Todo.org" "Inbox") | |
"* TODO %?\n %i\n %a") | |
("j" "Journal" entry (file+datetree "~/org/journal.org") | |
"* %?\nEntered on %U\n %i\n %a"))) | |
;; allow for export=>beamer by placing | |
;; #+LaTeX_CLASS: beamer in org files | |
(unless (boundp 'org-export-latex-classes) | |
(setq org-export-latex-classes nil)) | |
(add-to-list 'org-export-latex-classes | |
;; beamer class, for presentations | |
'("beamer" | |
"\\documentclass[11pt]{beamer}\n | |
\\mode<{{{beamermode}}}>\n | |
\\usetheme{{{{beamertheme}}}}\n | |
\\usecolortheme{{{{beamercolortheme}}}}\n | |
\\beamertemplateballitem\n | |
\\setbeameroption{show notes} | |
\\usepackage[utf8]{inputenc}\n | |
\\usepackage[T1]{fontenc}\n | |
\\usepackage{hyperref}\n | |
\\usepackage{color} | |
\\usepackage{listings} | |
\\lstset{numbers=none,language=[ISO]C++,tabsize=4, | |
frame=single, | |
basicstyle=\\small, | |
showspaces=false,showstringspaces=false, | |
showtabs=false, | |
keywordstyle=\\color{blue}\\bfseries, | |
commentstyle=\\color{red}, | |
}\n | |
\\usepackage{verbatim}\n | |
\\institute{{{{beamerinstitute}}}}\n | |
\\subject{{{{beamersubject}}}}\n" | |
("\\section{%s}" . "\\section*{%s}") | |
("\\begin{frame}[fragile]\\frametitle{%s}" | |
"\\end{frame}" | |
"\\begin{frame}[fragile]\\frametitle{%s}" | |
"\\end{frame}"))) | |
;; letter class, for formal letters | |
(add-to-list 'org-export-latex-classes | |
'("letter" | |
"\\documentclass[11pt]{letter}\n | |
\\usepackage[utf8]{inputenc}\n | |
\\usepackage[T1]{fontenc}\n | |
\\usepackage{color}" | |
("\\section{%s}" . "\\section*{%s}") | |
("\\subsection{%s}" . "\\subsection*{%s}") | |
("\\subsubsection{%s}" . "\\subsubsection*{%s}") | |
("\\paragraph{%s}" . "\\paragraph*{%s}") | |
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) | |
(add-to-list 'org-export-latex-classes | |
'("article" | |
"\\documentclass{article}" | |
("\\section{%s}" . "\\section*{%s}"))) | |
(defvar journal-file "~/Journal.org" | |
"Path to OrgMode journal file.") | |
(defvar org-journal-date-format "%Y-%m-%d" | |
"Date format string for journal headings.") | |
(defun start-journal-entry () | |
"Start a new journal entry." | |
(interactive) | |
(find-file journal-file) | |
(goto-char (point-min)) | |
(org-insert-heading) | |
(org-insert-time-stamp (current-time) t) | |
(open-line 2) | |
(insert " ")) | |
;; global key binding for org-mode | |
(global-set-key (kbd "C-c j") 'start-journal-entry) | |
(setq org-hide-leading-stars t) | |
;; csound-x | |
(setq load-path (cons "~/Library/Application Support/Aquamacs Emacs/stef-elisp/" load-path)) | |
;(require 'stef-elisp) | |
;;; w3m | |
;; (require 'w3m-load) | |
;; (setq w3m-command "/usr/local/bin/w3m") | |
;; (setq browse-url-browser-function 'w3m-browse-url) | |
;; (autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." t) | |
;; optional keyboard short-cut | |
(global-set-key "\C-xm" 'w3-follow-url-at-point) | |
;;; zenburn theme | |
;;; (color-theme-zenburn) | |
;;; writeroom-like settings for full screen editing. Don't know yet how to revert these. | |
(defun writeroom () | |
"Switches to a WriteRoom-like fullscreen style" | |
(interactive) | |
(when (featurep 'aquamacs) | |
;; switch to white on black | |
(color-theme-initialize) | |
(color-theme-clarity) | |
;; switch to Garamond 36pt | |
(aquamacs-autoface-mode 0) | |
(set-frame-font "-apple-garamond-medium-r-normal--36-360-72-72-m-360-iso10646-1") | |
;; switch to fullscreen mode | |
(aquamacs-toggle-full-frame))) | |
;; clojure-mode | |
(add-to-list 'load-path "/Users/fernandoipar/src/") | |
(require 'clojure-mode) | |
(add-to-list 'load-path "/Library/Applicatio\ Support/Aquamacs Emacs/SLIME/") | |
(add-hook 'clojure-mode-hook 'paredit-mode) | |
;; (require 'slime) | |
;; go mode | |
(add-to-list 'load-path "/usr/local/go/misc/emacs/" t) | |
(require 'go-mode-load) | |
(require 'go-mode) | |
(add-hook 'before-save-hook #'gofmt-before-save) | |
;; prolog | |
(autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) | |
(autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t) | |
(autoload 'mercury-mode "prolog" "Major mode for editing Mercury programs." t) | |
(setq prolog-system 'swi) | |
(setq auto-mode-alist (append '(("\\.pl$" . prolog-mode) | |
("\\.m$" . mercury-mode)) | |
auto-mode-alist)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment