Created
November 5, 2010 13:39
-
-
Save butcher/664172 to your computer and use it in GitHub Desktop.
Emacs configuration to work with Ruby and RubyOnRails
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
;; Theme | |
(load-file "~/.emacs.d/color-theme-butcher.el") | |
(color-theme-butcher) | |
(set-frame-font "-misc-fixed-medium-r-normal--15-*-75-75-c-90-koi8-r") | |
(tool-bar-mode) | |
(menu-bar-mode) | |
(scroll-bar-mode) | |
;; Rinari | |
(add-to-list 'load-path "~/.emacs.d/rinari/") | |
(require 'rinari) | |
(add-hook 'ruby-mode-hook | |
(lambda () | |
(defadvice ruby-mode-set-encoding | |
(around ruby-mode-set-encoding-disable activate) nil))) | |
;; Ruby-electric | |
(require 'ruby-electric) | |
(add-hook 'ruby-mode-hook 'ruby-electric-mode) | |
;; MuMaMo-Mode for rhtml files | |
(add-to-list 'load-path "~/.emacs.d/nxhtml/util/") | |
(require 'mumamo-fun) | |
(setq mumamo-chunk-coloring 5) | |
(add-to-list 'auto-mode-alist '("\\.rhtml\\'" . eruby-html-mumamo)) | |
(add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . eruby-html-mumamo)) | |
(add-to-list 'auto-mode-alist '("\\.js\\.erb\\'" . eruby-javascript-mumamo)) | |
(add-to-list 'auto-mode-alist '("\\.js\\.rjs\\'" . eruby-javascript-mumamo)) | |
;; Interactively Do Things | |
(require 'ido) | |
(ido-mode t) | |
;; git-emacs | |
(add-to-list 'load-path "~/.emacs.d/git-emacs/") | |
(require 'git-emacs) | |
(require 'git-status) | |
(setq git-state-modeline-decoration 'git-state-decoration-large-dot) | |
(global-set-key (kbd "C-x M-g") 'git-status) | |
;; Autocomplete | |
(add-to-list 'load-path "/home/butcher/.emacs.d/") | |
(require 'auto-complete-config) | |
(add-to-list 'ac-dictionary-directories "/home/butcher/.emacs.d//ac-dict") | |
(ac-config-default) | |
;; Rsense | |
(setq rsense-home "/opt/rsense-0.3") | |
(add-to-list 'load-path (concat rsense-home "/etc")) | |
(require 'rsense) | |
;; Rsense + Autocomplete | |
(add-hook 'ruby-mode-hook | |
(lambda () | |
(add-to-list 'ac-sources 'ac-source-rsense-method) | |
(add-to-list 'ac-sources 'ac-source-rsense-constant))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment