Permalink
Browse files

Switch to literate config format

  • Loading branch information...
smiller committed Feb 21, 2015
1 parent 4ddf807 commit 10ad631c4a88a99d3e3b63c37c91c05fb8510b2d
Showing with 634 additions and 820 deletions.
  1. +3 −1 .gitignore
  2. +2 −0 Cask
  3. +0 −25 defaults.el
  4. +2 −23 init.el
  5. +0 −62 key-bindings.el
  6. +0 −195 load-packages.el
  7. +0 −25 mode-hooks.el
  8. +0 −28 mods-dired.el
  9. +0 −2 mods-flymake-ruby.el
  10. +0 −69 mods-org.el
  11. +0 −2 mods-pbcopy.el
  12. +0 −8 mods-robe.el
  13. +0 −14 mods-rspec.el
  14. +0 −20 mods-ruby-tools.el
  15. +0 −33 mods-typopunct.el
  16. +0 −48 mods-wp.el
  17. +0 −2 mods-yasnippet.el
  18. +0 −116 pbcopy.el
  19. +493 −0 sean.org
  20. +0 −8 server.el
  21. +134 −0 test/.emacs.d-test.el
  22. +0 −135 test/mods-org-test.el
  23. +0 −1 themes.el
  24. +0 −3 verse-line.el
View
@@ -4,4 +4,6 @@
/url/*
projectile-bookmarks.eld
TAGS
bookmarks
bookmarks
tangled-settings.el
tangled-code.el
View
2 Cask
@@ -26,6 +26,8 @@
(depends-on "robe")
(depends-on "company")
(depends-on "pbcopy")
(development
(depends-on "f")
(depends-on "ecukes")
View
@@ -1,25 +0,0 @@
;; -- disable stuff ----------------------------------------------------------
(setq make-backup-files nil)
(setq auto-save-default nil)
(setq inhibit-startup-message t)
(fset 'yes-or-no-p 'y-or-n-p)
(menu-bar-mode -1)
;; -- rows and columns -------------------------------------------------------
(setq line-number-mode t)
(setq column-number-mode t)
(setq linum-format "%4d ")
(setq-default fill-column 80)
;; -- windmove ---------------------------------------------------------------
(define-key input-decode-map "\e[1;2A" [S-up])
(windmove-default-keybindings)
(setq windmove-wrap-around t)
(projectile-global-mode)
;; -- avoid ruby deep indent -------------------------------------------------
(setq ruby-deep-indent-paren nil)
;; -- delete trailing whitespace ---------------------------------------------
(add-hook 'before-save-hook 'delete-trailing-whitespace)
View
25 init.el
@@ -1,25 +1,4 @@
(require 'cask "~/.cask/cask.el")
(cask-initialize)
;; (load "~/.emacs.d/load-packages")
(load "~/.emacs.d/pbcopy")
(load "~/.emacs.d/defaults")
(load "~/.emacs.d/mode-hooks")
(load "~/.emacs.d/themes")
(load "~/.emacs.d/key-bindings")
(load "~/.emacs.d/verse-line")
(load "~/.emacs.d/server")
(load "~/.emacs.d/mods-dired")
(load "~/.emacs.d/mods-pbcopy")
(load "~/.emacs.d/mods-rspec")
(load "~/.emacs.d/mods-ruby-tools")
(load "~/.emacs.d/mods-typopunct")
(load "~/.emacs.d/mods-yasnippet")
(load "~/.emacs.d/mods-flymake-ruby")
(load "~/.emacs.d/mods-robe")
(load "~/.emacs.d/mods-org")
(load "~/.emacs.d/mods-wp")
(load-file "~/.emacs.d/tangled-settings.el")
(load-file "~/.emacs.d/tangled-code.el")
View
@@ -1,62 +0,0 @@
(global-set-key (kbd "C-c f") 'projectile-find-file)
(global-set-key (kbd "C-c h") 'helm-projectile)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
(global-set-key (kbd "C-c SPC") 'ace-jump-mode)
(global-set-key (kbd "C-x o") 'ace-window)
;; http://whattheemacsd.com/key-bindings.el-03.html
(global-set-key (kbd "M-j")
(lambda ()
(interactive)
(join-line -1)))
;;
(global-set-key (kbd "C-c r g q")
(lambda ()
(interactive)
(find-file "db/structure.sql")))
(global-set-key (kbd "C-x RET <right>") 'windmove-right)
(global-set-key (kbd "C-x RET <left>") 'windmove-left)
(global-set-key (kbd "C-x RET <up>") 'windmove-up)
(global-set-key (kbd "C-x RET <down>") 'windmove-down)
(global-set-key (kbd "C-c C-g C-d")
(lambda ()
(interactive)
(setq default-directory "~/Dropbox/gesta/")
(dired ".")))
(global-set-key (kbd "C-c C-g C-h")
(lambda ()
(interactive)
(setq default-directory "~/Dropbox/gesta/")
(find-file "2015.org")))
(global-set-key (kbd "C-c C-g C-t")
(lambda ()
(interactive)
(setq default-directory "~/Dropbox/gesta/")
(find-file "todo.org")))
(global-set-key (kbd "C-c C-g C-a")
(lambda ()
(interactive)
(setq default-directory "~/Dropbox/gesta/")
(find-file "2015.org")
(split-window-horizontally)
(find-file "todo.org")))
(global-set-key (kbd "C-c C-g C-u")
(lambda ()
(interactive)
(setq default-directory "~/code/autrui/")
(dired ".")))
View
@@ -1,195 +0,0 @@
;; From: https://github.com/bbatsov/prelude/blob/master/core/prelude-packages.el
;; with modifications to selected packages
;;; prelude-packages.el --- Emacs Prelude: default package selection.
;;
;; Copyright © 2011-2013 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
;; URL: https://github.com/bbatsov/prelude
;; Version: 1.0.0
;; Keywords: convenience
;; This file is not part of GNU Emacs.
;;; Commentary:
;; Takes care of the automatic installation of all the packages required by
;; Emacs Prelude.
;;; License:
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 3
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'cl)
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
;; needed for typopunct
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
;; set package-user-dir to be relative to Prelude install path
(setq package-user-dir (expand-file-name "elpa" "~/.emacs.d/"))
(package-initialize)
(defvar prelude-packages
'(
;; from smiller: solid
ag
feature-mode
rspec-mode
rvm
typopunct
;; from smiller: trying out
enotify
markdown-mode
rinari
robe
ruby-tools
projectile-rails
dired-details
yasnippet
enh-ruby-mode
flymake-ruby
company
ace-window
;; from smiller: trying out for org2blog
xml-rpc
metaweblog
org2blog
htmlize
;; from prelude
ace-jump-mode
dash
diminish
elisp-slime-nav
expand-region
flx-ido
flycheck gist
git-commit-mode
gitconfig-mode
gitignore-mode
grizzl
guru-mode
helm
helm-projectile
ido-ubiquitous
key-chord
magit
multiple-cursors
projectile
rainbow-mode
smartparens
smex
undo-tree
volatile-highlights
zenburn-theme)
"A list of packages to ensure are installed at launch.")
(defun prelude-packages-installed-p ()
"Check if all packages in `prelude-packages' are installed."
(every #'package-installed-p prelude-packages))
(defun prelude-require-package (package)
"Install PACKAGE unless already installed."
(unless (package-installed-p package)
(package-install package)))
(defun prelude-require-packages (packages)
"Ensure PACKAGES are installed.
Missing packages are installed automatically."
(mapc #'prelude-require-package packages))
(defalias 'prelude-ensure-module-deps 'prelude-require-packages)
(defun prelude-install-packages ()
"Install all packages listed in `prelude-packages'."
(unless (prelude-packages-installed-p)
;; check for new packages (package versions)
(message "%s" "Emacs Prelude is now refreshing its package database...")
(package-refresh-contents)
(message "%s" " done.")
;; install the missing packages
(prelude-require-packages prelude-packages)))
(prelude-install-packages)
(defmacro prelude-auto-install (extension package mode)
"When file with EXTENSION is opened triggers auto-install of PACKAGE.
PACKAGE is installed only if not already present. The file is opened in MODE."
`(add-to-list 'auto-mode-alist
`(,extension . (lambda ()
(unless (package-installed-p ',package)
(package-install ',package))
(,mode)))))
(defvar prelude-auto-install-alist
'(("\\.clj\\'" clojure-mode clojure-mode)
("\\.coffee\\'" coffee-mode coffee-mode)
("\\.css\\'" css-mode css-mode)
("\\.csv\\'" csv-mode csv-mode)
("\\.d\\'" d-mode d-mode)
("\\.dart\\'" dart-mode dart-mode)
("\\.erl\\'" erlang erlang-mode)
("\\.feature\\'" feature-mode feature-mode)
("\\.go\\'" go-mode go-mode)
("\\.groovy\\'" groovy-mode groovy-mode)
("\\.haml\\'" haml-mode haml-mode)
("\\.hs\\'" haskell-mode haskell-mode)
("\\.latex\\'" auctex LaTeX-mode)
("\\.less\\'" less-css-mode less-css-mode)
("\\.lua\\'" lua-mode lua-mode)
("\\.markdown\\'" markdown-mode markdown-mode)
("\\.md\\'" markdown-mode markdown-mode)
("\\.ml\\'" tuareg tuareg-mode)
("\\.php\\'" php-mode php-mode)
("PKGBUILD\\'" pkgbuild-mode pkgbuild-mode)
("\\.sass\\'" sass-mode sass-mode)
("\\.scala\\'" scala-mode2 scala-mode)
("\\.scss\\'" scss-mode scss-mode)
("\\.slim\\'" slim-mode slim-mode)
("\\.textile\\'" textile-mode textile-mode)
("\\.yml\\'" yaml-mode yaml-mode)))
;; markdown-mode doesn't have autoloads for the auto-mode-alist
;; so we add them manually if it's already installed
(when (package-installed-p 'markdown-mode)
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)))
(when (package-installed-p 'pkgbuild-mode)
(add-to-list 'auto-mode-alist '("PKGBUILD\\'" . pkgbuild-mode)))
;; build auto-install mappings
(mapc
(lambda (entry)
(let ((extension (car entry))
(package (cadr entry))
(mode (cadr (cdr entry))))
(unless (package-installed-p package)
(prelude-auto-install extension package mode))))
prelude-auto-install-alist)
(provide 'prelude-packages)
;; Local Variables:
;; byte-compile-warnings: (not cl-functions)
;; End:
;;; prelude-packages.el ends here
View
@@ -1,25 +0,0 @@
(defun my-text-mode-hook ()
(typopunct-mode)
(linum-mode -1)
(auto-fill-mode 1)
(set-input-method "TeX")
(define-key org-mode-map (kbd "M-s M-q") 'my/begin-end-quote)
(define-key org-mode-map (kbd "M-s M-v") 'my/begin-end-verse)
(define-key org-mode-map (kbd "M-s M-x") 'my/begin-end-example)
(define-key org-mode-map (kbd "M-s M-e") 'my/begin-end-src-emacs-lisp)
(define-key org-mode-map (kbd "M-s M-r") 'my/begin-end-src-ruby)
)
(add-hook 'text-mode-hook 'my-text-mode-hook)
(defun my-code-mode-hook ()
(whitespace-mode)
(linum-mode)
(typopunct-mode -1))
(add-hook 'ruby-mode-hook 'my-code-mode-hook)
(add-hook 'ruby-mode-hook
(lambda () (rvm-activate-corresponding-ruby)))
(add-hook 'js-mode-hook 'my-code-mode-hook)
(add-hook 'emacs-lisp-mode-hook 'my-code-mode-hook)
(add-hook 'projectile-mode-hook 'projectile-rails-on)
View
@@ -1,28 +0,0 @@
(require 'dired-x)
;; http://whattheemacsd.com/setup-dired.el-01.html
;; Make dired less verbose
(require 'dired-details)
(setq-default dired-details-hidden-string "--- ")
(dired-details-install)
;; http://whattheemacsd.com/setup-dired.el-02.html
(setq-default dired-omit-files-p t)
(defun dired-back-to-top ()
(interactive)
(beginning-of-buffer)
(dired-next-line (if dired-omit-mode 2 4)))
(define-key dired-mode-map
(vector 'remap 'beginning-of-buffer) 'dired-back-to-top)
(defun dired-jump-to-bottom ()
(interactive)
(end-of-buffer)
(dired-next-line -1))
(define-key dired-mode-map
(vector 'remap 'end-of-buffer) 'dired-jump-to-bottom)
View
@@ -1,2 +0,0 @@
(require 'flymake-ruby)
(add-hook 'enh-ruby-mode-hook 'flymake-ruby-load)
Oops, something went wrong.

0 comments on commit 10ad631

Please sign in to comment.