Last active
December 22, 2015 10:29
-
-
Save cmhobbs/6459413 to your computer and use it in GitHub Desktop.
Fancy GUI Rails-friendly emacs install with functionality similar to Acumen Brands' dotmatrix for OSX.
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
;; extend the load-path | |
(let ((default-directory "~/.emacs.d/lisp/")) | |
(normal-top-level-add-to-load-path '(".")) | |
(normal-top-level-add-subdirs-to-load-path)) | |
;; package archives, MELPA and ELPA | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(when (< emacs-major-version 24) | |
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))) | |
(package-initialize) | |
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "http://marmalade-repo.org/packages/") | |
("melpa" . "http://melpa.milkbox.net/packages/"))) | |
(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. | |
'(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"]) | |
'(custom-enabled-themes (quote (deeper-blue)))) | |
(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. | |
) | |
;;; Ruby/Rails development | |
;; RVM support | |
;; Ruby Version Manager | |
(require 'rvm) | |
(rvm-use-default) | |
;; automatically add 'end' after class, module, def etc. | |
;; automatically pair braces, single and double quotes | |
(require 'ruby-electric) | |
(add-hook 'ruby-mode-hook 'ruby-electric-mode) | |
;; Rails support | |
;; jump to corresping model/view/controller, | |
;; find file in project, etc | |
(require 'rinari) | |
(add-hook 'ruby-mode-hook 'rinari-minor-mode) | |
;; whitespace-mode for Ruby code | |
;; helps with cleaning out unnecessary white space | |
;;(add-hook 'ruby-mode-hook 'whitespace-mode) | |
;; rspec | |
;; run specs in a compilation buffer | |
(add-to-list 'load-path "~/.emacs.d/vendor/rspec-mode") | |
(require 'rspec-mode) | |
;; cucumber | |
;; run features in a compilation buffer | |
;;(add-to-list 'load-path "~/.emacs.d/vendor/cucumber-mode") | |
(require 'feature-mode) | |
(add-to-list 'auto-mode-alist '("\.feature$" . feature-mode)) | |
;; syntax highlighting etc. for HAML | |
(require 'haml-mode) | |
;; display strings representing colors with | |
;; the color they represent as background | |
(add-to-list 'load-path "~/.emacs.d/vendor/jd-el") | |
(require 'rainbow-mode) | |
(add-hook 'css-mode-hook 'rainbow-mode) |
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
- install emacs via http://emacsformacosx.com/ (do not install homebrew emacs) | |
- open and close emacsforosx | |
- copy config to ~/.emacs | |
- mkdir ~/.emacs.d/lisp | |
- open emacs (ignore errors) | |
- M-x package-install RET rvm | |
- M-x package-install RET rinari | |
- M-x package-install RET ruby-electric | |
- M-x package-install RET rspec-mode | |
- M-x package-install RET feature-mode | |
- M-x package-install RET haml-mode | |
- M-x package-install RET rainbow-mode | |
- close and re-open emacs | |
- happy hacking! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment