Created
January 22, 2014 16:31
-
-
Save pbostrom/8561948 to your computer and use it in GitHub Desktop.
emacs/tmux 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
| set-window-option -g xterm-keys on |
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) | |
| (add-to-list 'package-archives | |
| '("marmalade" . | |
| "http://marmalade-repo.org/packages/")) | |
| (package-initialize) | |
| ;;(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
| ;; ("marmalade" . "http://marmalade-repo.org/packages/") | |
| ;; ("melpa" . "http://melpa.milkbox.net/packages/"))) | |
| (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)) | |
| (require 'evil) | |
| (evil-mode 1) | |
| (define-key evil-motion-state-map "\t" nil) | |
| (autoload 'paredit-mode "paredit" | |
| "Minor mode for pseudo-structurally editing Lisp code." | |
| t) | |
| ;; clojure-mode | |
| (defun customize-clojure-mode () | |
| (paredit-mode 1) | |
| (local-set-key "\M-{" 'paredit-wrap-curly) | |
| (local-set-key "\M-}" 'paredit-close-curly-and-newline) | |
| ; (local-set-key "\M-[" 'paredit-wrap-square) | |
| (local-set-key "\M-]" 'paredit-close-square-and-newline)) | |
| (add-hook 'clojure-mode-hook 'customize-clojure-mode) | |
| (add-to-list 'auto-mode-alist '("\.cljs$" . clojure-mode)) | |
| (add-hook 'cider-repl-mode-hook 'paredit-mode) | |
| ;; jj exits insert mode when using evil-mode | |
| (define-key evil-insert-state-map "j" #'cofi/maybe-exit) | |
| (evil-define-command cofi/maybe-exit () | |
| :repeat change | |
| (interactive) | |
| (let ((modified (buffer-modified-p))) | |
| (insert "j") | |
| (let ((evt (read-event (format "Insert %c to exit insert state" ?j) | |
| nil 0.5))) | |
| (cond | |
| ((null evt) (message "")) | |
| ((and (integerp evt) (char-equal evt ?j)) | |
| (delete-char -1) | |
| (set-buffer-modified-p modified) | |
| (push 'escape unread-command-events)) | |
| (t (setq unread-command-events (append unread-command-events | |
| (list evt)))))))) | |
| (define-key input-decode-map "\e[1;5A" [C-up]) | |
| (define-key input-decode-map "\e[1;5B" [C-down]) | |
| (define-key input-decode-map "\e[1;5C" [C-right]) | |
| (define-key input-decode-map "\e[1;5D" [C-left]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment