Permalink
Browse files

Updating emacs init

  • Loading branch information...
Vitor Pellegrino
Vitor Pellegrino committed Sep 10, 2012
1 parent 54c39ab commit a6507fc220ab8305f2b6c92a6e3c3a3c87a30ac8
Showing with 24 additions and 0 deletions.
  1. +24 −0 emacs.d/init.el
View
@@ -1,6 +1,13 @@
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(setq make-backup-files nil)
(setq auto-save-default nil)
(setq-default tab-width 2)
(setq-default indent-tabs-mode nil)
(setq inhibit-startup-message t)
(package-initialize)
(when (not package-archive-contents)
@@ -13,3 +20,20 @@
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
(defun ruby-mode-hook ()
(autoload 'ruby-mode "ruby-mode" nil t)
(add-to-list 'auto-mode-alist '("Capfile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile" . ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rake\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rb\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.ru\\'" . ruby-mode))
(add-hook 'ruby-mode-hook '(lambda ()
(setq ruby-deep-arglist t)
(setq ruby-deep-indent-paren nil)
(setq c-tab-always-indent nil)
(require 'inf-ruby)
(require 'ruby-compilation)
(define-key ruby-mode-map (kbd "M-r") 'run-rails-test-or-ruby-buffer))))

0 comments on commit a6507fc

Please sign in to comment.