Last active
October 22, 2017 05:39
-
-
Save masatoi/d2dec1e56091e9dfeff3df567adf1709 to your computer and use it in GitHub Desktop.
Setting file for lem
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
| ;;; -*- coding:utf-8; mode:Lisp -*- | |
| (in-package :lem) | |
| ;; Key Bindings | |
| (define-command split-3-window-horizontally () () | |
| (let ((w-width (window-width))) | |
| (split-active-window-horizontally) | |
| (shrink-window-horizontally (- (window-width) (floor (/ w-width 3)))) | |
| (other-window) | |
| (split-active-window-horizontally) | |
| (other-window) | |
| (other-window -2))) | |
| (define-key *global-keymap* "M-o" 'other-window) | |
| (define-key *global-keymap* "M-i" 'delete-other-windows) | |
| (define-key *global-keymap* "M-u" 'split-active-window-vertically) | |
| (define-key *global-keymap* "M-U" 'split-3-window-horizontally) | |
| (define-key *global-keymap* "M-z" 'query-replace) | |
| (define-key *global-keymap* "C-x l" 'start-lisp-repl) | |
| (define-key *global-keymap* "C-x u" 'undo) | |
| ;; Syntax highlight | |
| (define-color-theme "my-dark-theme" ("emacs-dark") | |
| (foreground "#FFFFFF") | |
| (background "#000000") | |
| (minibuffer-prompt-attribute :foreground "cyan" :bold-p t) | |
| (region :foreground nil :background "blue") | |
| (syntax-string-attribute :foreground "orange" :bold-p t) | |
| (syntax-comment-attribute :foreground "deep sky blue") | |
| (syntax-keyword-attribute :foreground "magenta" :bold-p t) | |
| (syntax-constant-attribute :foreground "green") | |
| (syntax-function-name-attribute :foreground "cyan" :bold-p t) | |
| (syntax-variable-attribute :foreground "LightGoldenrod") | |
| (syntax-type-attribute :foreground "PaleGreen") | |
| (lem.show-paren:showparen-attribute :foreground "cyan" :background nil :bold-p t)) | |
| (load-theme "my-dark-theme") | |
| (in-package :lem.lisp-mode) | |
| (define-command scroll-up-one-line () () (scroll-up 2)) | |
| (define-command scroll-down-one-line () () (scroll-up -2)) | |
| (define-key *lisp-mode-keymap* "M-p" 'scroll-up-one-line) | |
| (define-key *lisp-mode-keymap* "M-n" 'scroll-down-one-line) | |
| (define-key *lisp-mode-keymap* "C-x C-e" 'lisp-eval-last-sexp) | |
| (define-key *lisp-mode-keymap* "C-c C-i" 'lisp-comment-region) | |
| (define-key *lisp-mode-keymap* "C-c C-o" 'lisp-uncomment-region) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment