From 5fecaf2c55ceb7b7fff55ec87592a0cb61b6cfa1 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Thu, 23 May 2013 19:17:11 -0400 Subject: [PATCH] Initial commit --- .emacs.d/.gitignore | 4 ++ .emacs.d/Carton | 30 ++++++++++++ .emacs.d/init.el | 115 ++++++++++++++++++++++++++++++++++++++++++++ .zshrc | 44 +++++++++++++++++ 4 files changed, 193 insertions(+) create mode 100644 .emacs.d/.gitignore create mode 100644 .emacs.d/Carton create mode 100644 .emacs.d/init.el create mode 100644 .zshrc diff --git a/.emacs.d/.gitignore b/.emacs.d/.gitignore new file mode 100644 index 0000000..ddb29a9 --- /dev/null +++ b/.emacs.d/.gitignore @@ -0,0 +1,4 @@ +elpa +auto-save-list +session.* +ac-comphist.dat diff --git a/.emacs.d/Carton b/.emacs.d/Carton new file mode 100644 index 0000000..7b04934 --- /dev/null +++ b/.emacs.d/Carton @@ -0,0 +1,30 @@ +; -*- mode: emacs-lisp; -*- +(source "elpa" "http://tromey.com/elpa/") +(source "marmalade" "http://marmalade-repo.org/packages/") +(source "melpa" "http://melpa.milkbox.net/packages/") + +(depends-on "color-theme") +(depends-on "magit") +(depends-on "org") +(depends-on "auto-complete") +(depends-on "git-gutter") + +;; PHP +(depends-on "multi-web-mode") +(depends-on "php-mode") + +;; Python +(depends-on "python") + +;; Erlang +(depends-on "erlang") + +;; Haskell +(depends-on "haskell-mode") + +;; Markdown +(depends-on "markdown-mode") + +;; Common Lisp +;; (depends-on "slime") +;; (depends-on "slime-repl") diff --git a/.emacs.d/init.el b/.emacs.d/init.el new file mode 100644 index 0000000..82dc9e3 --- /dev/null +++ b/.emacs.d/init.el @@ -0,0 +1,115 @@ +(add-to-list 'load-path "~/.emacs.d/elisp") + +(require 'package) +(add-to-list 'package-archives + '("elpa" . "http://tromey.com/elpa/")) +;; Add the user-contributed repository +(add-to-list 'package-archives + '("marmalade" . "http://marmalade-repo.org/packages/")) + +;; Milkypostman’s Experimental Lisp Package Repository +(add-to-list 'package-archives + '("melpa" . "http://melpa.milkbox.net/packages/") t) + +(package-initialize) + +(ido-mode) + +;; Autocomplete +(require 'auto-complete-config) +(ac-config-default) + +;; Git Gutter +(global-git-gutter-mode t) + +;; Fixes an issue with ECB +;; (setq stack-trace-on-error t) + +;; SLIME +(load (expand-file-name "~/quicklisp/slime-helper.el")) + +;; Erlang configuration +(add-to-list + 'load-path + (car (file-expand-wildcards "/usr/lib/erlang/lib/tools-*/emacs"))) +(setq erlang-root-dir "/usr/lib/erlang") +(setq exec-path (cons "/usr/lib/erlang/bin" exec-path)) +(require 'erlang-start) +(add-hook 'erlang-mode-hook + (lambda () + ;; when starting an Erlang shell in Emacs, the node name + ;; by default should be "emacs" + (setq inferior-erlang-machine-options '("-sname" "emacs")))) + +(require 'color-theme) +(color-theme-initialize) +(if (display-graphic-p) + (color-theme-ld-dark) + (color-theme-ld-dark)) + +;; Window transparency +(set-frame-parameter (selected-frame) 'alpha '(85 50)) +(add-to-list 'default-frame-alist '(alpha 85 50)) + +(setq auto-mode-alist + (cons '("\\.md" . markdown-mode) auto-mode-alist)) + +(setq ido-enable-flex-matching t) +(global-set-key (kbd "C-,") 'kill-whole-line) + +;; PHP Mode +(add-to-list 'auto-mode-alist '("\\.php$" . php-mode)) +(add-to-list 'auto-mode-alist '("\\.inc$" . php-mode)) + +;; Multi-Web-Mode +(require 'multi-web-mode) +(setq mweb-default-major-mode 'html-mode) +(setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>") + (js-mode "]*>" "") + (css-mode "]*>" ""))) +(setq mweb-filename-extensions '("php" "htm" "html" "ctp" "phtml" "php4" "php5")) +(multi-web-global-mode 1) + +;; SLIME +(setq inferior-lisp-program "clisp") + +;; emacsredux.com +(defun rename-file-and-buffer () + "Rename the current buffer and file it is visiting." + (interactive) + (let ((filename (buffer-file-name))) + (if (not (and filename (file-exists-p filename))) + (message "Buffer is not visiting a file!") + (let ((new-name (read-file-name "New name: " filename))) + (cond + ((vc-backend filename) (vc-rename-file filename new-name)) + (t + (rename-file filename new-name t) + (rename-buffer new-name) + (set-visited-file-name new-name) + (set-buffer-modified-p nil))))))) + +(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. + '(blank-chars (quote (tabs trailing space-before-tab))) + '(blank-global-modes t) + '(browse-url-browser-function (quote browse-url-generic)) + '(browse-url-generic-program "google-chrome") + '(c-basic-offset 4) + '(c-default-style "bsd") + '(eol-mnemonic-dos "(DOS)") + '(eol-mnemonic-mac "(Mac)") + '(haskell-mode-hook (quote (turn-on-haskell-indentation)) t) + '(indent-tabs-mode nil) + '(inferior-lisp-program "sbcl") + '(inhibit-startup-screen t)) +(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. + '(default ((t (:inherit nil :stipple nil :background "black" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 80 :width normal :foundry "unknown" :family "DejaVu Sans Mono"))))) +(put 'narrow-to-region 'disabled nil) diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..b27cbfc --- /dev/null +++ b/.zshrc @@ -0,0 +1,44 @@ +if [ ! -d $HOME/antigen ]; then + git clone https://github.com/zsh-users/antigen.git $HOME/antigen +fi + +source $HOME/antigen/antigen.zsh + +# Load the oh-my-zsh library +antigen-lib + +# Bundles from the default repo (robbyrussel's oh-my-zsh) +antigen-bundles </dev/null; then + source virtualenvwrapper.sh +fi + +# Emacs Carton +if [ ! -d ${HOME}/.carton ]; then + curl -fsSkL https://raw.github.com/rejeep/carton/master/go | sh +fi +export PATH="${HOME}/.carton/bin:$PATH"