Skip to content

Instantly share code, notes, and snippets.

@spo11
Created September 17, 2013 18:03
Show Gist options
  • Save spo11/6598186 to your computer and use it in GitHub Desktop.
Save spo11/6598186 to your computer and use it in GitHub Desktop.
My init.el
;; File: init.el
;; Author: A.J.
;; PeepOpen and Textmate configuration for fuzzy-file-finding
;; Emacs-starter-kit by technomancy
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
;; Keybindings
(setq mac-option-modifier 'super)
(setq mac-command-modifier 'meta)
;; Packages
(when (not package-archive-contents)
(package-refresh-contents))
;; Add in your own as you wish:
(defvar my-packages '(starter-kit
starter-kit-lisp
starter-kit-js
starter-kit-ruby
starter-kit-eshell
clojure-mode
clojure-test-mode
textmate
auto-complete
nrepl
rspec-mode
rvm
coffee-mode
web-mode
ack-and-a-half
monokai-theme
soothe-theme
ir-black-theme
tronesque-theme
noctilux-theme
markdown-mode
helm
helm-cmd-t
)
"A list of packages to ensure are installed at launch.")
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
;; For peepopen
(require 'textmate)
(add-to-list 'load-path "~/.emacs.d/vendor/")
(require 'peepopen)
(textmate-mode)
(setq ns-pop-up-frames nil) ;; So that the file opens in the same frame
;; Project Configuration for PeepOpen
(defun open (project) (interactive (list (read-directory-name "Peepopen for project: " "~/code/")))
(flet ((textmate-project-root () (file-truename project)))
(peepopen-goto-file-gui)))
;;(global-set-key [(alt ?o)] 'open)
;; Helm
(require 'helm-config)
(require 'helm-cmd-t)
(global-set-key (kbd "M-t") 'helm-cmd-t)
;; Ack!
(setq exec-path (append exec-path '("/usr/local/bin/")))
(require 'ack-and-a-half)
;; Create shorter aliases for ack!
(defalias 'ack 'ack-and-a-half)
(defalias 'ack-same 'ack-and-a-half-same)
(defalias 'ack-find-file 'ack-and-a-half-find-file)
(defalias 'ack-find-file-same 'ack-and-a-half-find-file-same)
;; Indentation for Compojure
(require 'clojure-mode)
(define-clojure-indent
(defroutes 'defun)
(GET 2)
(POST 2)
(PUT 2)
(DELETE 2)
(HEAD 2)
(ANY 2)
(context 2))
;; Autocomplete
(require 'auto-complete-config)
(ac-config-default)
;; Indentation for coffee-mode
(setq coffee-tab-width 2)
;; RVM_ZSH hack to make rspec-mode and rvm place nice
(defadvice rspec-compile (around rspec-compile-around)
"Use BASH shell for running the specs because of ZSH issues."
(let ((shell-file-name "/bin/bash"))
ad-do-it))
(ad-activate 'rspec-compile)
;; Use RVM
(require 'rvm)
(rvm-activate-corresponding-ruby)
(rvm-autodetect-ruby)
;; Rspec Mode
(setq rspec-use-rake-when-possible nil)
;; Web Mode
(add-to-list 'load-path "~/.emacs.d/vendor/web-mode")
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.jsp\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
;; Themes
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/emacs-clues-theme")
(load-theme 'zenburn t)
;; Fonts
(set-face-attribute 'default nil
:family "Source Code Pro" :height 125 :weight 'normal)
;; Menubar
;; (menu-bar-mode 1)
;; Line Numbers
;; (global-linum-mode 1)
;; Powerline?
;;(add-to-list 'load-path "~/.emacs.d/vendor/powerline")
;;(require 'powerline)
;;(powerline-center-theme)
(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.
'(Linum-format "%7i ")
'(ansi-color-names-vector ["#110F13" "#b13120" "#719f34" "#ceae3e" "#7c9fc9" "#7868b5" "#009090" "#F4EAD5"])
'(ansi-term-color-vector [unspecified "#110F13" "#b13120" "#719f34" "#ceae3e" "#7c9fc9" "#7868b5" "#009090" "#F4EAD5"])
'(custom-safe-themes (quote ("124e34f6ea0bc8a50d3769b9f251f99947d6b4d9422c6d85dc4bcc9c2e51b39c" "ae8d0f1f36460f3705b583970188e4fbb145805b7accce0adb41031d99bd2580" "e53cc4144192bb4e4ed10a3fa3e7442cae4c3d231df8822f6c02f1220a0d259a" "de2c46ed1752b0d0423cde9b6401062b67a6a1300c068d5d7f67725adc6c3afb" "73b835431bdbc4e83a3b176a38ebb740fbac78aa2635e1d4827b3c8211e0bc99" "51bea7765ddaee2aac2983fac8099ec7d62dff47b708aa3595ad29899e9e9e44" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "f81e1ca8cefb9d4ded877d39f082c812294bcac41fce5be7230caa6cc83bde37" "fa189fcf5074d4964f0a53f58d17c7e360bb8f879bd968ec4a56dc36b0013d29" "f89e21c3aef10d2825f2f079962c2237cd9a45f4dc1958091be8a6f5b69bb70c" "d0ff5ea54497471567ed15eb7279c37aef3465713fb97a50d46d95fe11ab4739" "9f42bccce1e13fa5017eb8718574db099e85358b9f424db78e7318f86d1be08f" "2b80b8864ae9fa004bf55bb6d30bb948621f85eb23ee80a1d7bf071d0e4b51e1" "8874901e0011a7b07e546b65be1726c4cc3f35cf1a60f8805e6cb5bb59ba305c" "c7359bd375132044fe993562dfa736ae79efc620f68bab36bd686430c980df1c" "978bd4603630ecb1f01793af60beb52cb44734fc14b95c62e7b1a05f89b6c811" "dc46381844ec8fcf9607a319aa6b442244d8c7a734a2625dac6a1f63e34bc4a6" "3341f6db5ac17e4174f7488c40676e7f0464f1e88519a59303dc7e7774245bbf" "d293542c9d4be8a9e9ec8afd6938c7304ac3d0d39110344908706614ed5861c9" "6f3060ac8300275c990116794e1ba897b6a8af97c51a0cb226a98759752cddcf" "1dc3a2e894d5ee9e90035e4ff90d57507857c07e9a394f182a961e935b3b5497" "88d556f828e4ec17ac074077ef9dcaa36a59dccbaa6f2de553d6528b4df79cbd" "787574e2eb71953390ed2fb65c3831849a195fd32dfdd94b8b623c04c7f753f0" "3b7e62b9884f1533f8eac5d21b252e5b8098274d7d9096521db84e4f10797ae3" "d921083fbcd13748dd1eb638f66563d564762606f6ea4389ea9328b6f92723b7" "fe6330ecf168de137bb5eddbf9faae1ec123787b5489c14fa5fa627de1d9f82b" "2153b9f60f1c81068180086a38e3b117cdd69d3c9e1cd84aef49ab8628712b14" "085b401decc10018d8ed2572f65c5ba96864486062c0a2391372223294f89460" "5bff694d9bd3791807c205d8adf96817ee1e572654f6ddc5e1e58b0488369f9d" "6cfe5b2f818c7b52723f3e121d1157cf9d95ed8923dbc1b47f392da80ef7495d" "68769179097d800e415631967544f8b2001dae07972939446e21438b1010748c" "0b2e94037dbb1ff45cc3cd89a07901eeed93849524b574fa8daa79901b2bfdcf" "9f443833deb3412a34d2d2c912247349d4bd1b09e0f5eaba11a3ea7872892000" default)))
'(fci-rule-character-color "#202020")
'(fci-rule-color "#202020")
'(main-line-color1 "#1e1e1e")
'(main-line-color2 "#111111")
'(main-line-separator-style (quote chamfer))
'(ns-command-modifier (quote meta)))
(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.
'(default ((t (:background "nil")))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment