Skip to content

Instantly share code, notes, and snippets.

@hvrauhal
Created May 10, 2015 15:29
Show Gist options
  • Save hvrauhal/28f0dc6f1033c90181c4 to your computer and use it in GitHub Desktop.
Save hvrauhal/28f0dc6f1033c90181c4 to your computer and use it in GitHub Desktop.
.emacs.d/init.el
(require 'package)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
(package-initialize)
(defvar my-packages '(rainbow-delimiters
clojure-mode
clojure-test-mode
markdown-mode
cider
regex-tool
js2-mode
better-defaults))
; fetch the list of packages available
(unless package-archive-contents
(package-refresh-contents))
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
(setq inhibit-splash-screen t)
(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.
'(css-indent-offset 2)
'(current-language-environment "UTF-8")
'(indent-tabs-mode nil nil nil "Use spaces only.")
'(initial-scratch-message nil)
'(nxml-child-indent 2)
'(nxml-outline-child-indent 2)
'(sgml-basic-offset 4)
'(show-paren-mode t)
'(transient-mark-mode (quote identity)))
(when (fboundp 'tool-bar-mode)
(tool-bar-mode -1))
(when (fboundp 'scroll-bar-mode)
(scroll-bar-mode 'nil))
(add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Vagrantfile" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
(global-set-key (kbd "M-S-SPC") 'hippie-expand)
(setq mac-option-key-is-meta nil)
(setq mac-command-key-is-meta t)
(setq mac-command-modifier 'meta)
(setq mac-option-modifier nil)
;; fix the PATH variable
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell (shell-command-to-string "$SHELL -i -c 'echo $PATH'")))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(when window-system (set-exec-path-from-shell-PATH))
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
(add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
(put 'narrow-to-region 'disabled nil)
(set-face-attribute 'default nil
:family "Source Code Pro" :height 130 :weight 'normal)
(defadvice hl-line-mode (after
dino-advise-hl-line-mode
activate compile)
(set-face-background 'hl-line "#f8f8f8"))
;(global-hl-line-mode)
(defun my-js2-mode-toggle-strict-missing-semi-warning ()
(interactive)
(setq js2-strict-missing-semi-warning (eq js2-strict-missing-semi-warning nil))
(js2-mode))
(setq js-indent-level 2)
; (delete-selection-mode 1)
(load (expand-file-name "~/quicklisp/slime-helper.el"))
;; Replace "sbcl" with the path to your implementation
(setq inferior-lisp-program "sbcl")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment