Created
September 10, 2011 00:53
-
-
Save wraithan/1207738 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
;;; 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)) | |
;; Misc | |
(add-to-list 'load-path "~/.emacs.d/rc") | |
(add-to-list 'load-path "~/.emacs.d/elpa") | |
(tool-bar-mode -1) | |
(setq mouse-autoselect-window t) | |
(setq focus-follows-mouse t) | |
(setq backup-inhibited t) | |
(setq auto-save-default nil) | |
(setq-default ispell-program-name "aspell") | |
;; fly-make | |
(add-hook 'find-file-hook 'flymake-find-file-hook) | |
(defun my-flymake-show-next-error () | |
(interactive) | |
(flymake-goto-next-error) | |
(flymake-display-err-menu-for-current-line)) | |
(global-set-key "\C-c\C-v" 'my-flymake-show-next-error) | |
;;Keybindings | |
(global-set-key [C-tab] 'other-window) | |
(global-unset-key "\C-z") | |
(define-key text-mode-map [M-tab] 'ispell-word) | |
(add-hook 'html-mode-hook (lambda () (define-key html-mode-map (kbd "TAB") 'self-insert-command))) | |
;; Theme | |
(require 'color-theme) | |
(require 'color-theme-orico-black) | |
(color-theme-initialize) | |
(color-theme-orico-black) | |
(which-func-mode t) | |
(setq default-mode-line-format | |
(list '(:eval (if (buffer-modified-p) "* " " ")) | |
"%20b %[(" | |
'mode-name | |
'minor-mode-alist | |
")%] " | |
'(which-func-mode ("" which-func-format " ")) | |
'(line-number-mode "%4l:") | |
'(column-number-mode "%3c ") | |
'default-directory | |
" " | |
'(:eval (symbol-name last-command)))) | |
(setq mode-line-format default-mode-line-format) | |
(global-hl-line-mode 1) | |
(set-face-background 'hl-line "#333") | |
;; Dired-X | |
(require 'dired-x) | |
(setq dired-omit-files "^\\.pyc$") | |
(add-hook 'dired-mode-hook (lambda () (dired-omit-mode 1))) | |
;; Gist | |
(require 'gist) | |
;; Nginx | |
(require 'nginx-mode) | |
;; Lisp | |
(autoload 'paredit-mode "paredit" | |
"Minor mode for pseudo-structurally editing Lisp code." t) | |
(add-hook 'emacs-lisp-mode-hook (lambda () (paredit-mode +1))) | |
(add-hook 'lisp-mode-hook (lambda () (paredit-mode +1))) | |
(add-hook 'lisp-interaction-mode-hook (lambda () (paredit-mode +1))) | |
(add-to-list 'completion-ignored-extensions ".lx64fsl") | |
;; SLIME | |
;; (add-to-list 'load-path "/usr/share/emacs/site-lisp/slime/") | |
;; (require 'slime) | |
;; (add-hook 'lisp-mode-hook (lambda () (slime-mode t))) | |
;; (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t))) | |
;; (setq inferior-lisp-program "sbcl") | |
;; (slime-setup '(slime-fancy)) | |
;; (define-key slime-mode-map [tab] 'slime-indent-and-complete-symbol) | |
;; (define-key slime-mode-map (kbd "C-m") 'reindent-then-newline-and-indent) | |
;; ;;; Stop SLIME's REPL from grabbing DEL, which is annoying when | |
;; ;;; backspacing over a '(' | |
;; (defun override-slime-repl-bindings-with-paredit () | |
;; (define-key slime-repl-mode-map | |
;; (read-kbd-macro paredit-backward-delete-key) nil)) | |
;; (add-hook 'slime-repl-mode-hook 'override-slime-repl-bindings-with-paredit) | |
;; Uniquify | |
(require 'uniquify) | |
(setq uniquify-buffer-name-style 'forward) | |
(setq uniquify-separator "/") | |
(setq uniquify-after-kill-buffer-p t) | |
(setq uniquify-ignore-buffers-re "^\\*") | |
;; Yasnippet | |
(add-to-list 'load-path "~/.emacs.d/yasnippet") | |
(require 'yasnippet) | |
(yas/initialize) | |
(yas/load-directory "~/.emacs.d/yasnippet/snippets") | |
;; lua-mode | |
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode)) | |
(autoload 'lua-mode "lua-mode" "Lua editing mode." t) | |
;; haskell-mode | |
(load "~/.emacs.d/haskell-mode/haskell-site-file.el") | |
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode) | |
(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent) | |
;; jshint-mode | |
(add-to-list 'load-path "~/.emacs.d/jshint-mode") | |
(require 'flymake-jshint) | |
(add-hook 'javascript-mode-hook | |
(lambda () (flymake-mode t))) | |
;; org-mode | |
(require 'org-install) | |
(require 'org-protocol) | |
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) | |
(define-key global-map "\C-cc" 'org-capture) | |
(define-key global-map "\C-ca" 'org-agenda) | |
(setq org-log-done t) | |
(setq org-capture-templates | |
'(("t" "Ticket" entry (file+headline "~/sync/work/todo.org" "unsorted-tickets") | |
"* TODO %?%^g \nticket: [[https://jira.aquameta.com/browse/BH-%^{ticket}][BH-%^{ticket}]]") | |
("n" "Note" entry (file+headline "~/sync/work/todo.org" "unsorted-notes") | |
"* TODO %?\n") | |
("w" "Default org-protocol capture" entry (file+headline "~/sync/todo.org" "Links") | |
"* TODO %c\nAdded: %u\n %i" :immediate-finish t))) | |
(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. | |
'(org-agenda-files (quote ("~/sync/work/todo.org")))) | |
(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. | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment