Created
September 1, 2018 09:12
-
-
Save masatoi/5164c3040fd45fa724bcbe0e46f09bca to your computer and use it in GitHub Desktop.
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" 'lem-lisp-mode::start-lisp-repl) | |
| (define-key *global-keymap* "C-x u" 'undo) | |
| (define-key *global-keymap* "C-c C-i" 'lem.language-mode::comment-region) | |
| (define-key *global-keymap* "C-c C-o" 'lem.language-mode::uncomment-region) | |
| (define-key *global-keymap* "C-c a" 'lem-lisp-mode:lisp-apropos-all) | |
| (define-key *global-keymap* "M-j" 'lem.abbrev:abbrev) | |
| ;; Color theme | |
| ;; Enable paren coloring | |
| (setf lem-lisp-mode.paren-coloring:*paren-attribute* (make-attribute :foreground "red")) | |
| (lem-lisp-mode.paren-coloring:toggle-paren-coloring) | |
| (define-color-theme "my-dark-theme" ("emacs-dark") | |
| (foreground "#ffffff") | |
| (background "#000000") | |
| (minibuffer-prompt-attribute :foreground "cyan" :bold-p t) | |
| (syntax-string-attribute :foreground "orange" :bold-p nil) | |
| (syntax-comment-attribute :foreground "deep sky blue") | |
| (syntax-keyword-attribute :foreground "#ff80ff" :bold-p nil) | |
| (syntax-constant-attribute :foreground "green") | |
| (syntax-function-name-attribute :foreground "cyan" :bold-p nil) | |
| (syntax-variable-attribute :foreground "LightGoldenrod") | |
| (syntax-type-attribute :foreground "PaleGreen") | |
| (syntax-builtin-attribute :foreground "alice blue") | |
| (lem.show-paren:showparen-attribute :foreground "cyan" :background nil :bold-p t) | |
| (modeline :background "gray20" :foreground "white") | |
| (modeline-inactive :background "gray20" :foreground "gray60") | |
| (region :foreground nil :background "blue")) | |
| (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) | |
| (in-package :lem) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment