Skip to content

Instantly share code, notes, and snippets.

@anthonator
Last active September 30, 2015 23:38
Show Gist options
  • Select an option

  • Save anthonator/1881191 to your computer and use it in GitHub Desktop.

Select an option

Save anthonator/1881191 to your computer and use it in GitHub Desktop.

Revisions

  1. anthonator revised this gist Sep 27, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions .emacs
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,7 @@
    (add-to-list 'auto-mode-alist '("Gemfile" . ruby-mode))
    (add-to-list 'auto-mode-alist '("Rakefile" . ruby-mode))
    (add-to-list 'auto-mode-alist '("Guardfile" . ruby-mode))
    (add-to-list 'auto-mode-alist '("Bowerfile" . 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))
  2. anthonator revised this gist Aug 16, 2012. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion .emacs
    Original file line number Diff line number Diff line change
    @@ -72,7 +72,8 @@
    (autoload 'scss-mode "scss-mode" nil t)
    (add-to-list 'auto-mode-alist '("\\.scss$" . scss-mode))
    (setq scss-compile-at-save nil)
    (setq scss-indent-level 2))
    (setq css-indent-level 2)
    (setq css-indent-offset 2))

    (defun coffee-mode-hook ()
    (autoload 'coffee-mode "coffee-mode" nil t)
  3. anthonator revised this gist Aug 16, 2012. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion .emacs
    Original file line number Diff line number Diff line change
    @@ -70,7 +70,9 @@

    (defun scss-mode-hook ()
    (autoload 'scss-mode "scss-mode" nil t)
    (add-to-list 'auto-mode-alist '("\\.scss$" . scss-mode)))
    (add-to-list 'auto-mode-alist '("\\.scss$" . scss-mode))
    (setq scss-compile-at-save nil)
    (setq scss-indent-level 2))

    (defun coffee-mode-hook ()
    (autoload 'coffee-mode "coffee-mode" nil t)
  4. anthonator revised this gist Jun 9, 2012. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion .emacs
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@
    (setq-default tab-width 2)
    (setq-default indent-tabs-mode nil)
    (setq inhibit-startup-message t)
    (setq linum-format "%d ")

    (fset 'yes-or-no-p 'y-or-n-p)

    @@ -16,6 +17,7 @@
    (column-number-mode t)
    (set-fringe-style -1)
    (tooltip-mode -1)
    (global-linum-mode t)

    (require 'package)
    (setq package-archives (cons '("tromey" . "http://tromey.com/elpa/") package-archives))
    @@ -121,4 +123,4 @@
    :features coffee-mode
    :after (lambda () (coffee-mode-hook)))
    ))
    (el-get 'sync)
    (el-get 'sync)
  5. anthonator revised this gist Jun 9, 2012. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions .emacs
    Original file line number Diff line number Diff line change
    @@ -29,9 +29,12 @@
    (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 '("Guardfile" . 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-to-list 'auto-mode-alist '("\\.gemspec\\'" . ruby-mode))
    (add-to-list 'auto-mode-alist '("\\.jbuilder\\'" . ruby-mode))
    (add-hook 'ruby-mode-hook '(lambda ()
    (setq ruby-deep-arglist t)
    (setq ruby-deep-indent-paren nil)
  6. anthonator created this gist Feb 22, 2012.
    121 changes: 121 additions & 0 deletions .emacs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,121 @@
    (push "/usr/local/git/bin" exec-path)

    (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)

    (fset 'yes-or-no-p 'y-or-n-p)

    (delete-selection-mode t)
    (scroll-bar-mode -1)
    (tool-bar-mode -1)
    (blink-cursor-mode t)
    (show-paren-mode t)
    (column-number-mode t)
    (set-fringe-style -1)
    (tooltip-mode -1)

    (require 'package)
    (setq package-archives (cons '("tromey" . "http://tromey.com/elpa/") package-archives))
    (package-initialize)

    (add-to-list 'load-path "~/.emacs.d/el-get/el-get")
    (require 'el-get)

    (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))))

    (defun rhtml-mode-hook ()
    (autoload 'rhtml-mode "rhtml-mode" nil t)
    (add-to-list 'auto-mode-alist '("\\.erb\\'" . rhtml-mode))
    (add-to-list 'auto-mode-alist '("\\.rjs\\'" . rhtml-mode))
    (add-hook 'rhtml-mode '(lambda ()
    (define-key rhtml-mode-map (kbd "M-s") 'save-buffer))))

    (defun yaml-mode-hook ()
    (autoload 'yaml-mode "yaml-mode" nil t)
    (add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
    (add-to-list 'auto-mode-alist '("\\.yaml$" . yaml-mode)))

    (defun css-mode-hook ()
    (autoload 'css-mode "css-mode" nil t)
    (add-hook 'css-mode-hook '(lambda ()
    (setq css-indent-level 2)
    (setq css-indent-offset 2))))

    (defun haml-mode-hook ()
    (autoload 'haml-mode "haml-mode" nil t)
    (add-hook 'haml-mode-hook '(lambda ()
    (setq indent-tabs-mode nil)
    (define-key haml-mode-map "\C-m" 'newline-and-indent))))

    (defun scss-mode-hook ()
    (autoload 'scss-mode "scss-mode" nil t)
    (add-to-list 'auto-mode-alist '("\\.scss$" . scss-mode)))

    (defun coffee-mode-hook ()
    (autoload 'coffee-mode "coffee-mode" nil t)
    (add-to-list 'auto-mode-alist '("\\.coffee$" . coffee-mode))
    (add-to-list 'auto-mode-alist '("Cakefile" . coffee-mode)))

    (setq el-get-sources
    '((:name ruby-mode
    :type elpa
    :load "ruby-mode.el"
    :after (lambda () (ruby-mode-hook)))
    (:name inf-ruby
    :type elpa)
    (:name ruby-compilation
    :type elpa)
    (:name css-mode
    :type elpa)
    (:name textmate
    :type git
    :url "git://github.com/defunkt/textmate.el"
    :load "textmate.el")
    (:name rvm
    :type git
    :url "http://github.com/djwhitt/rvm.el.git"
    :load "rvm.el"
    :compile ("rvm.el")
    :after (lambda() (rvm-use-default)))
    (:name rhtml
    :type git
    :url "https://github.com/eschulte/rhtml.git"
    :features rhtml-mode)
    (:name yaml-mode
    :type git
    :url "http://github.com/yoshiki/yaml-mode.git"
    :features yaml-mode
    :after (lambda () (yaml-mode-hook)))
    (:name haml-mode
    :type git
    :url "https://github.com/nex3/haml-mode"
    :features haml-mode
    :after (lambda () (haml-mode-hook)))
    (:name scss-mode
    :type git
    :url "https://github.com/antonj/scss-mode.git"
    :features scss-mode
    :after (lambda () (scss-mode-hook)))
    (:name coffee-mode
    :type git
    :url "https://github.com/defunkt/coffee-mode.git"
    :features coffee-mode
    :after (lambda () (coffee-mode-hook)))
    ))
    (el-get 'sync)