diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-08-28 23:20:47 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-08-28 23:20:47 -0400 |
commit | 18eec2656aa8a78b5a4ac9aaca8722c9981eedf4 (patch) | |
tree | 6e69422642bbaf8b34ae91e98ca7ca58de52251d /lisp | |
parent | c4c800f2bd14f895a2da5ab8d3cdd653b15dd26c (diff) | |
download | emacs.d-18eec2656aa8a78b5a4ac9aaca8722c9981eedf4.tar.gz |
Use prefix in name of all custom maps
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-ace.el | 2 | ||||
-rw-r--r-- | lisp/init-buffile.el | 18 | ||||
-rw-r--r-- | lisp/init-editing.el | 46 | ||||
-rw-r--r-- | lisp/init-external.el | 26 | ||||
-rw-r--r-- | lisp/init-framewin.el | 10 | ||||
-rw-r--r-- | lisp/init-gnus.el | 18 | ||||
-rw-r--r-- | lisp/init-org.el | 20 | ||||
-rw-r--r-- | lisp/init-projectile.el | 16 |
8 files changed, 78 insertions, 78 deletions
diff --git a/lisp/init-ace.el b/lisp/init-ace.el index 1635e31..78d0d72 100644 --- a/lisp/init-ace.el +++ b/lisp/init-ace.el @@ -40,7 +40,7 @@ ;;; Ace Window -(define-key window-map "a" 'ace-window) +(define-key km/window-map "a" 'ace-window) (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l) aw-scope 'global) diff --git a/lisp/init-buffile.el b/lisp/init-buffile.el index bfb9c8d..98eb16f 100644 --- a/lisp/init-buffile.el +++ b/lisp/init-buffile.el @@ -89,8 +89,8 @@ user." ;;; Temporary scratch files -(define-prefix-command 'scratch-map) -(global-set-key (kbd "C-c s") 'scratch-map) +(define-prefix-command 'km/scratch-map) +(global-set-key (kbd "C-c s") 'km/scratch-map) (defmacro km/make-find-scratch-func (name extension) `(defun ,(intern (concat "km/find-scratch-" name)) () @@ -105,12 +105,12 @@ user." (km/make-find-scratch-func "org" ".org") (km/make-find-scratch-func "nomode" "") -(define-key scratch-map "e" 'km/find-scratch-elisp) -(define-key scratch-map "p" 'km/find-scratch-python) -(define-key scratch-map "s" 'km/find-scratch-shell) -(define-key scratch-map "r" 'km/find-scratch-r) -(define-key scratch-map "h" 'km/find-scratch-haskell) -(define-key scratch-map "o" 'km/find-scratch-org) -(define-key scratch-map "n" 'km/find-scratch-nomode) +(define-key km/scratch-map "e" 'km/find-scratch-elisp) +(define-key km/scratch-map "p" 'km/find-scratch-python) +(define-key km/scratch-map "s" 'km/find-scratch-shell) +(define-key km/scratch-map "r" 'km/find-scratch-r) +(define-key km/scratch-map "h" 'km/find-scratch-haskell) +(define-key km/scratch-map "o" 'km/find-scratch-org) +(define-key km/scratch-map "n" 'km/find-scratch-nomode) (provide 'init-buffile) diff --git a/lisp/init-editing.el b/lisp/init-editing.el index fad7a07..0d5646d 100644 --- a/lisp/init-editing.el +++ b/lisp/init-editing.el @@ -60,13 +60,13 @@ (add-hook 'before-save-hook 'km/cleanup-buffer) ;; Replace map -(define-prefix-command 'replace-map) -(global-set-key (kbd "C-c r") 'replace-map) +(define-prefix-command 'km/replace-map) +(global-set-key (kbd "C-c r") 'km/replace-map) -(define-key replace-map "s" 'query-replace) -(define-key replace-map "S" 'replace-string) -(define-key replace-map "r" 'query-replace-regexp) -(define-key replace-map "R" 'replace-regexp) +(define-key km/replace-map "s" 'query-replace) +(define-key km/replace-map "S" 'replace-string) +(define-key km/replace-map "r" 'query-replace-regexp) +(define-key km/replace-map "R" 'replace-regexp) (defun km/narrow-to-comment-heading () "Narrow to the current comment heading subtree. @@ -136,23 +136,23 @@ and '<<<' mark the bounds of the narrowed region. (key-chord-define-global ",c" 'km/toggle-line-or-region-comment) ;; Put multiple cursors map under insert prefix. -(define-prefix-command 'editing-map) -(global-set-key (kbd "C-c e") 'editing-map) +(define-prefix-command 'km/editing-map) +(global-set-key (kbd "C-c e") 'km/editing-map) -(define-key editing-map "l" 'mc/edit-lines) -(define-key editing-map "b" 'mc/edit-beginnings-of-lines) -(define-key editing-map "e" 'mc/edit-ends-of-lines) -(define-key editing-map "n" 'mc/mark-next-like-this) -(define-key editing-map "p" 'mc/mark-previous-like-this) -(define-key editing-map "a" 'mc/mark-all-like-this) +(define-key km/editing-map "l" 'mc/edit-lines) +(define-key km/editing-map "b" 'mc/edit-beginnings-of-lines) +(define-key km/editing-map "e" 'mc/edit-ends-of-lines) +(define-key km/editing-map "n" 'mc/mark-next-like-this) +(define-key km/editing-map "p" 'mc/mark-previous-like-this) +(define-key km/editing-map "a" 'mc/mark-all-like-this) (global-set-key (kbd "C-;") 'er/expand-region) -(define-key editing-map "i" 'indent-relative) +(define-key km/editing-map "i" 'indent-relative) ;; Kill map -(define-prefix-command 'kill-map) -(global-set-key (kbd "C-c k") 'kill-map) +(define-prefix-command 'km/kill-map) +(global-set-key (kbd "C-c k") 'km/kill-map) (defun km/kill-string-at-point () (interactive) @@ -172,11 +172,11 @@ and '<<<' mark the bounds of the narrowed region. (km/make-kill-thing-at-point "line" 'line 'kill-line) (km/make-kill-thing-at-point "sexp" 'sexp 'kill-sexp) -(define-key kill-map "s" 'km/kill-string-at-point) -(define-key kill-map "." 'km/kill-sentence-at-point) -(define-key kill-map "w" 'km/kill-word-at-point) -(define-key kill-map "p" 'km/kill-paragraph-at-point) -(define-key kill-map "l" 'km/kill-line-at-point) +(define-key km/kill-map "s" 'km/kill-string-at-point) +(define-key km/kill-map "." 'km/kill-sentence-at-point) +(define-key km/kill-map "w" 'km/kill-word-at-point) +(define-key km/kill-map "p" 'km/kill-paragraph-at-point) +(define-key km/kill-map "l" 'km/kill-line-at-point) ;; Taken from prelude-core.el. (defun km/join-next-line-with-space () @@ -184,6 +184,6 @@ and '<<<' mark the bounds of the narrowed region. (interactive) (delete-indentation 1)) -(define-key kill-map "j" 'km/join-next-line-with-space) +(define-key km/kill-map "j" 'km/join-next-line-with-space) (provide 'init-editing) diff --git a/lisp/init-external.el b/lisp/init-external.el index 600e414..7c3befd 100644 --- a/lisp/init-external.el +++ b/lisp/init-external.el @@ -1,5 +1,5 @@ -(define-prefix-command 'external-map) -(global-set-key (kbd "C-c x") 'external-map) +(define-prefix-command 'km/external-map) +(global-set-key (kbd "C-c x") 'km/external-map) ;;; Terminals @@ -36,15 +36,15 @@ is non-nil." (setq buffer-name (km/zsh-ansi-term new-buffer))) (pop-to-buffer buffer-name))) -(define-key external-map "a" 'km/zsh-ansi-term) +(define-key km/external-map "a" 'km/zsh-ansi-term) ;; This overrides binding for `add-change-log-entry-other-window'. (define-key ctl-x-4-map "a" 'km/zsh-ansi-term-other-window) -(define-key external-map "t" 'km/open-external-terminal) -(define-key external-map "r" 'shell-command-on-region) -(define-key external-map "s" 'shell-command) -(define-key external-map "S" 'shell) +(define-key km/external-map "t" 'km/open-external-terminal) +(define-key km/external-map "r" 'shell-command-on-region) +(define-key km/external-map "s" 'shell-command) +(define-key km/external-map "S" 'shell) -(define-key external-map "w" 'woman) +(define-key km/external-map "w" 'woman) ;;; Compilation @@ -68,9 +68,9 @@ monitor setup)." (display-buffer comp-buffer) (error "No compilation buffer"))) -(define-key external-map "c" 'compile) -(define-key external-map "g" 'recompile) -(define-key external-map "o" 'km/display-compilation-other-window) +(define-key km/external-map "c" 'compile) +(define-key km/external-map "g" 'recompile) +(define-key km/external-map "o" 'km/display-compilation-other-window) ;; Give frequently-used recompile a shorter binding. (global-set-key (kbd "C-c g") 'recompile) @@ -88,8 +88,8 @@ monitor setup)." (revert-buffer) (view-mode 1)) -(define-key external-map "d" 'diff) -(define-key external-map "e" 'ediff) +(define-key km/external-map "d" 'diff) +(define-key km/external-map "e" 'ediff) (after 'diff (define-key diff-mode-map (kbd "C-c C-g") 'km/revert-buffer-and-view)) diff --git a/lisp/init-framewin.el b/lisp/init-framewin.el index 06f1f11..b954c4a 100644 --- a/lisp/init-framewin.el +++ b/lisp/init-framewin.el @@ -32,13 +32,13 @@ Assumes that the window is only split into two." (split-window-vertically)) (switch-to-buffer nil))) -(define-prefix-command 'window-map) -(global-set-key (kbd "C-c w") 'window-map) +(define-prefix-command 'km/window-map) +(global-set-key (kbd "C-c w") 'km/window-map) -(define-key window-map "s" 'km/swap-windows) -(define-key window-map "l" 'km/switch-window-split) +(define-key km/window-map "s" 'km/swap-windows) +(define-key km/window-map "l" 'km/switch-window-split) -(define-key window-map "f" 'make-frame) +(define-key km/window-map "f" 'make-frame) (global-set-key (kbd "M-o") 'scroll-other-window) diff --git a/lisp/init-gnus.el b/lisp/init-gnus.el index 4e6ac13..12c3993 100644 --- a/lisp/init-gnus.el +++ b/lisp/init-gnus.el @@ -249,14 +249,14 @@ read. Don't ask to confirm." ;; 'S p'. (define-key gnus-summary-mode-map "a" 'ace-jump-mode) -(define-prefix-command 'mail-map) -(global-set-key (kbd "C-x m") 'mail-map) - -(define-key mail-map "g" 'gnus) -(define-key mail-map "b" 'km/gnus-select-or-bury) -(define-key mail-map "p" 'gnus-plugged) -(define-key mail-map "u" 'gnus-unplugged) -(define-key mail-map "s" 'km/sync-mail) -(define-key mail-map "n" 'notmuch-search) +(define-prefix-command 'km/mail-map) +(global-set-key (kbd "C-x m") 'km/mail-map) + +(define-key km/mail-map "g" 'gnus) +(define-key km/mail-map "b" 'km/gnus-select-or-bury) +(define-key km/mail-map "p" 'gnus-plugged) +(define-key km/mail-map "u" 'gnus-unplugged) +(define-key km/mail-map "s" 'km/sync-mail) +(define-key km/mail-map "n" 'notmuch-search) (provide 'init-gnus) diff --git a/lisp/init-org.el b/lisp/init-org.el index 00f25f3..858b7de 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -40,16 +40,16 @@ (setq initial-major-mode 'org-mode) -(define-prefix-command 'global-org-map) -(global-set-key (kbd "C-c o") 'global-org-map) - -(define-key global-org-map "l" 'org-store-link) -(define-key global-org-map "o" 'org-open-at-point-global) -(define-key global-org-map "a" 'org-agenda) -(define-key global-org-map "b" 'org-iswitchb) -(define-key global-org-map "s" 'org-save-all-org-buffers) -(define-key global-org-map "m" 'km/open-main-orgfile) -(define-key global-org-map "p" 'poporg-dwim) +(define-prefix-command 'km/global-org-map) +(global-set-key (kbd "C-c o") 'km/global-org-map) + +(define-key km/global-org-map "l" 'org-store-link) +(define-key km/global-org-map "o" 'org-open-at-point-global) +(define-key km/global-org-map "a" 'org-agenda) +(define-key km/global-org-map "b" 'org-iswitchb) +(define-key km/global-org-map "s" 'org-save-all-org-buffers) +(define-key km/global-org-map "m" 'km/open-main-orgfile) +(define-key km/global-org-map "p" 'poporg-dwim) (key-chord-define-global ",a" 'org-agenda) (setq org-structure-template-alist diff --git a/lisp/init-projectile.el b/lisp/init-projectile.el index 9b9332a..9b38b9e 100644 --- a/lisp/init-projectile.el +++ b/lisp/init-projectile.el @@ -116,20 +116,20 @@ path is always relative to `projectile-project-root'." (define-key projectile-mode-map (kbd "C-c p 4 v") 'km/projectile-view-file-other-window) -(define-prefix-command 'projectile-ctl-x-4-map) -(define-key ctl-x-4-map "p" 'projectile-ctl-x-4-map) +(define-prefix-command 'km/projectile-ctl-x-4-map) +(define-key ctl-x-4-map "p" 'km/projectile-ctl-x-4-map) -(define-key projectile-ctl-x-4-map (kbd "C-o") +(define-key km/projectile-ctl-x-4-map (kbd "C-o") 'projectile-display-buffer) -(define-key projectile-ctl-x-4-map "b" +(define-key km/projectile-ctl-x-4-map "b" 'projectile-switch-to-buffer-other-window) -(define-key projectile-ctl-x-4-map "d" +(define-key km/projectile-ctl-x-4-map "d" 'projectile-find-dir-other-window) -(define-key projectile-ctl-x-4-map "f" +(define-key km/projectile-ctl-x-4-map "f" 'projectile-find-file-other-window) -(define-key projectile-ctl-x-4-map "v" +(define-key km/projectile-ctl-x-4-map "v" 'km/projectile-view-file-other-window) -(define-key projectile-ctl-x-4-map "t" +(define-key km/projectile-ctl-x-4-map "t" 'projectile-find-implementation-or-test-other-window) (provide 'init-projectile) |