Last active
December 24, 2015 21:49
-
-
Save jarohen/6868590 to your computer and use it in GitHub Desktop.
my emacs config
This file contains hidden or 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
| (require 'package) | |
| (package-initialize) | |
| (add-to-list 'package-archives | |
| '("marmalade" . "http://marmalade-repo.org/packages/")) | |
| (add-to-list 'package-archives | |
| '("melpa" . "http://melpa.milkbox.net/packages/") t) | |
| (menu-bar-mode -1) | |
| (if tool-bar-mode | |
| (tool-bar-mode -1)) | |
| (if (boundp 'scroll-bar-mode) | |
| (scroll-bar-mode -1)) | |
| (require 'dired+) | |
| (setq browse-url-generic-program (executable-find "chromium") | |
| browse-url-browser-function 'browse-url-generic) | |
| (setq backup-directory-alist `(("." . "~/.emacs-backups"))) | |
| (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. | |
| '(inhibit-startup-screen t) | |
| '(nrepl-port "7888")) | |
| (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. | |
| '(magit-diff-none ((t (:foreground "gray")))) | |
| '(magit-item-highlight ((t (:background "gray20"))))) | |
| (require 'color-theme) | |
| (color-theme-initialize) | |
| (color-theme-calm-forest) | |
| (require 'clojure-mode) | |
| (require 'paredit) | |
| (require 'nrepl) | |
| (define-clojure-indent | |
| (cond-> 1) | |
| (cond->> 1) | |
| (some-> 1) | |
| (some->> 1) | |
| (db-transaction 1)) | |
| (global-set-key (kbd "C-x C-b") 'buffer-menu-other-window) | |
| (global-set-key (kbd "C-x m") 'eshell) | |
| (global-set-key (kbd "C-c g") 'magit-status) | |
| (global-set-key (kbd "C-M-g") 'magit-status) | |
| (global-set-key (kbd "C-x k") 'kill-this-buffer) | |
| (global-unset-key (kbd "C-x C-c")) | |
| (global-unset-key (kbd "C-z")) | |
| (global-unset-key (kbd "C-x C-z")) | |
| (global-unset-key (kbd "C-x C-n")) | |
| (global-unset-key (kbd "C-x f")) | |
| (global-unset-key (kbd "<insert>")) | |
| (global-set-key (kbd "C-x C-r") 'rgrep) | |
| (global-set-key (kbd "C-c M-c") 'nrepl) | |
| (global-unset-key (kbd "M-k")) | |
| (global-set-key (kbd "C-c b") 'tramp-cleanup-all-buffers) | |
| (global-set-key (kbd "C-c c") 'tramp-cleanup-all-connections) | |
| (add-hook 'clojure-mode-hook 'paredit-mode) | |
| (add-hook 'clojure-mode-hook 'nrepl-interaction-mode) | |
| (add-hook 'clojure-mode-hook 'subword-mode) | |
| (add-hook 'lisp-interaction-mode-hook 'paredit-mode) | |
| (add-hook 'emacs-lisp-mode-hook 'paredit-mode) | |
| (add-hook 'nrepl-repl-mode-hook 'paredit-mode) | |
| (add-hook 'css-mode-hook 'paredit-mode) | |
| (add-hook 'org-mode-hook 'org-indent-mode) | |
| (add-hook 'coffee-mode 'subword-mode) | |
| (fset 'clojure-insert-last-eval | |
| "(identity *1\225\C-u\230\C-\M-k") | |
| (define-key paredit-mode-map "{" 'paredit-open-curly) | |
| (define-key paredit-mode-map "}" 'paredit-close-curly) | |
| (define-key paredit-mode-map (kbd "<C-backspace>") 'paredit-backward-kill-word) | |
| (define-key paredit-mode-map (kbd "RET") 'reindent-then-newline-and-indent) | |
| (define-key clojure-mode-map (kbd "C-c j") 'insert-clojars) | |
| (define-key clojure-mode-map (kbd "C-c m") 'imenu) | |
| (define-key clojure-mode-map (kbd "C-M-y") 'clojure-insert-last-eval) | |
| (define-key nrepl-repl-mode-map (kbd "C-c C-q") 'nrepl-quit) | |
| (define-key nrepl-interaction-mode-map (kbd "C-c C-q") 'nrepl-quit) | |
| (show-paren-mode 1) | |
| (setq split-width-threshold 160) | |
| (setq split-height-threshold 60) | |
| (display-time-mode) | |
| (require 'uniquify) | |
| (setq uniquify-buffer-name-style 'forward) | |
| (setq uniquify-separator " • ") | |
| (setq uniquify-after-kill-buffer-p t) | |
| (defalias 'yes-or-no-p 'y-or-n-p) | |
| (autoload 'n3-mode "n3-mode") | |
| (add-to-list 'auto-mode-alist '("\\.edn$" . clojure-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.ttl$" . n3-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.n3$" . n3-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.owl$" . n3-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.markdown$" . markdown-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.coffee.erb$" . coffee-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.html.erb$" . html-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.pp$" . puppet-mode)) | |
| (put 'narrow-to-region 'disabled nil) | |
| (autoload 'archive-extract-hook "arc-mode") | |
| (add-hook 'archive-extract-hook (lambda () (toggle-read-only 1))) | |
| (global-auto-revert-mode t) | |
| (remove-hook 'git-commit-mode-hook 'turn-on-auto-fill) | |
| (remove-hook 'git-commit-mode-hook 'flyspell-mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment