|
|
@@ -0,0 +1,400 @@ |
|
|
;;; editor/meow/autoload.el -*- lexical-binding: t; -*- |
|
|
|
|
|
;;;autoload |
|
|
(defun meow--colemak-setup () |
|
|
(setq meow-cheatsheet-layout meow-cheatsheet-layout-colemak) |
|
|
(meow-motion-overwrite-define-key |
|
|
;; Use e to move up, n to move down. |
|
|
;; Since special modes usually use n to move down, we only overwrite e here. |
|
|
'("e" . meow-prev)) |
|
|
(meow-leader-define-key |
|
|
'("?" . meow-cheatsheet) |
|
|
;; To execute the originally e in MOTION state, use SPC e. |
|
|
'("e" . "H-e") |
|
|
'("1" . meow-digit-argument) |
|
|
'("2" . meow-digit-argument) |
|
|
'("3" . meow-digit-argument) |
|
|
'("4" . meow-digit-argument) |
|
|
'("5" . meow-digit-argument) |
|
|
'("6" . meow-digit-argument) |
|
|
'("7" . meow-digit-argument) |
|
|
'("8" . meow-digit-argument) |
|
|
'("9" . meow-digit-argument) |
|
|
'("0" . meow-digit-argument)) |
|
|
(meow-normal-define-key |
|
|
'("0" . meow-expand-0) |
|
|
'("1" . meow-expand-1) |
|
|
'("2" . meow-expand-2) |
|
|
'("3" . meow-expand-3) |
|
|
'("4" . meow-expand-4) |
|
|
'("5" . meow-expand-5) |
|
|
'("6" . meow-expand-6) |
|
|
'("7" . meow-expand-7) |
|
|
'("8" . meow-expand-8) |
|
|
'("9" . meow-expand-9) |
|
|
'("-" . negative-argument) |
|
|
'(";" . meow-reverse) |
|
|
'("," . meow-inner-of-thing) |
|
|
'("." . meow-bounds-of-thing) |
|
|
'("[" . meow-beginning-of-thing) |
|
|
'("]" . meow-end-of-thing) |
|
|
'("/" . meow-visit) |
|
|
'("a" . meow-append) |
|
|
'("A" . meow-open-below) |
|
|
'("b" . meow-back-word) |
|
|
'("B" . meow-back-symbol) |
|
|
'("c" . meow-change) |
|
|
'("d" . meow-delete) |
|
|
'("e" . meow-prev) |
|
|
'("E" . meow-prev-expand) |
|
|
'("f" . meow-find) |
|
|
'("g" . meow-cancel-selection) |
|
|
'("G" . meow-grab) |
|
|
'("h" . meow-left) |
|
|
'("H" . meow-left-expand) |
|
|
'("i" . meow-right) |
|
|
'("I" . meow-right-expand) |
|
|
'("j" . meow-join) |
|
|
'("k" . meow-kill) |
|
|
'("l" . meow-line) |
|
|
'("L" . meow-goto-line) |
|
|
'("m" . meow-mark-word) |
|
|
'("M" . meow-mark-symbol) |
|
|
'("n" . meow-next) |
|
|
'("N" . meow-next-expand) |
|
|
'("o" . meow-block) |
|
|
'("O" . meow-to-block) |
|
|
'("p" . meow-yank) |
|
|
'("q" . meow-quit) |
|
|
'("r" . meow-replace) |
|
|
'("s" . meow-insert) |
|
|
'("S" . meow-open-above) |
|
|
'("t" . meow-till) |
|
|
'("u" . meow-undo) |
|
|
'("v" . meow-search) |
|
|
'("w" . meow-next-word) |
|
|
'("W" . meow-next-symbol) |
|
|
'("x" . meow-delete) |
|
|
'("X" . meow-backward-delete) |
|
|
'("y" . meow-save) |
|
|
'("z" . meow-pop-selection) |
|
|
'("'" . repeat) |
|
|
'("<escape>" . mode-line-other-buffer))) |
|
|
|
|
|
;;;autoload |
|
|
(defun meow-setup-dvorak () |
|
|
(setq meow-cheatsheet-layout meow-cheatsheet-layout-dvorak) |
|
|
(meow-leader-define-key |
|
|
'("1" . meow-digit-argument) |
|
|
'("2" . meow-digit-argument) |
|
|
'("3" . meow-digit-argument) |
|
|
'("4" . meow-digit-argument) |
|
|
'("5" . meow-digit-argument) |
|
|
'("6" . meow-digit-argument) |
|
|
'("7" . meow-digit-argument) |
|
|
'("8" . meow-digit-argument) |
|
|
'("9" . meow-digit-argument) |
|
|
'("0" . meow-digit-argument) |
|
|
'("/" . meow-keypad-describe-key) |
|
|
'("?" . meow-cheatsheet)) |
|
|
(meow-motion-overwrite-define-key |
|
|
;; custom keybinding for motion state |
|
|
) |
|
|
(meow-normal-define-key |
|
|
'("0" . meow-expand-0) |
|
|
'("9" . meow-expand-9) |
|
|
'("8" . meow-expand-8) |
|
|
'("7" . meow-expand-7) |
|
|
'("6" . meow-expand-6) |
|
|
'("5" . meow-expand-5) |
|
|
'("4" . meow-expand-4) |
|
|
'("3" . meow-expand-3) |
|
|
'("2" . meow-expand-2) |
|
|
'("1" . meow-expand-1) |
|
|
'("-" . negative-argument) |
|
|
'(";" . meow-reverse) |
|
|
'("," . meow-inner-of-thing) |
|
|
'("." . meow-bounds-of-thing) |
|
|
'("<" . meow-beginning-of-thing) |
|
|
'(">" . meow-end-of-thing) |
|
|
'("a" . meow-append) |
|
|
'("A" . meow-open-below) |
|
|
'("b" . meow-back-word) |
|
|
'("B" . meow-back-symbol) |
|
|
'("c" . meow-change) |
|
|
'("d" . meow-delete) |
|
|
'("D" . meow-backward-delete) |
|
|
'("e" . meow-line) |
|
|
'("E" . meow-goto-line) |
|
|
'("f" . meow-find) |
|
|
'("g" . meow-cancel-selection) |
|
|
'("G" . meow-grab) |
|
|
'("h" . meow-left) |
|
|
'("H" . meow-left-expand) |
|
|
'("i" . meow-insert) |
|
|
'("I" . meow-open-above) |
|
|
'("j" . meow-join) |
|
|
'("k" . meow-kill) |
|
|
'("l" . meow-till) |
|
|
'("m" . meow-mark-word) |
|
|
'("M" . meow-mark-symbol) |
|
|
'("n" . meow-next) |
|
|
'("N" . meow-next-expand) |
|
|
'("o" . meow-block) |
|
|
'("O" . meow-to-block) |
|
|
'("p" . meow-prev) |
|
|
'("P" . meow-prev-expand) |
|
|
'("q" . meow-quit) |
|
|
'("Q" . meow-goto-line) |
|
|
'("r" . meow-replace) |
|
|
'("R" . meow-swap-grab) |
|
|
'("s" . meow-search) |
|
|
'("t" . meow-right) |
|
|
'("T" . meow-right-expand) |
|
|
'("u" . meow-undo) |
|
|
'("U" . meow-undo-in-selection) |
|
|
'("v" . meow-visit) |
|
|
'("w" . meow-next-word) |
|
|
'("W" . meow-next-symbol) |
|
|
'("x" . meow-save) |
|
|
'("X" . meow-sync-grab) |
|
|
'("y" . meow-yank) |
|
|
'("z" . meow-pop-selection) |
|
|
'("'" . repeat) |
|
|
'("<escape>" . mode-line-other-buffer))) |
|
|
|
|
|
;;;autoload |
|
|
(defun meow--setup-dvp () |
|
|
(setq meow-cheatsheet-layout meow-cheatsheet-layout-dvp) |
|
|
(meow-leader-define-key |
|
|
'("?" . meow-cheatsheet)) |
|
|
(meow-motion-overwrite-define-key |
|
|
;; custom keybinding for motion state |
|
|
) |
|
|
(meow-normal-define-key |
|
|
'("?" . meow-cheatsheet) |
|
|
'("*" . meow-expand-0) |
|
|
'("=" . meow-expand-9) |
|
|
'("!" . meow-expand-8) |
|
|
'("[" . meow-expand-7) |
|
|
'("]" . meow-expand-6) |
|
|
'("{" . meow-expand-5) |
|
|
'("+" . meow-expand-4) |
|
|
'("}" . meow-expand-3) |
|
|
'(")" . meow-expand-2) |
|
|
'("(" . meow-expand-1) |
|
|
'("1" . digit-argument) |
|
|
'("2" . digit-argument) |
|
|
'("3" . digit-argument) |
|
|
'("4" . digit-argument) |
|
|
'("5" . digit-argument) |
|
|
'("6" . digit-argument) |
|
|
'("7" . digit-argument) |
|
|
'("8" . digit-argument) |
|
|
'("9" . digit-argument) |
|
|
'("0" . digit-argument) |
|
|
'("-" . negative-argument) |
|
|
'(";" . meow-reverse) |
|
|
'("," . meow-inner-of-thing) |
|
|
'("." . meow-bounds-of-thing) |
|
|
'("<" . meow-beginning-of-thing) |
|
|
'(">" . meow-end-of-thing) |
|
|
'("a" . meow-append) |
|
|
'("A" . meow-open-below) |
|
|
'("b" . meow-back-word) |
|
|
'("B" . meow-back-symbol) |
|
|
'("c" . meow-change) |
|
|
'("d" . meow-delete) |
|
|
'("D" . meow-backward-delete) |
|
|
'("e" . meow-line) |
|
|
'("E" . meow-goto-line) |
|
|
'("f" . meow-find) |
|
|
'("g" . meow-cancel-selection) |
|
|
'("G" . meow-grab) |
|
|
'("h" . meow-left) |
|
|
'("H" . meow-left-expand) |
|
|
'("i" . meow-insert) |
|
|
'("I" . meow-open-above) |
|
|
'("j" . meow-join) |
|
|
'("k" . meow-kill) |
|
|
'("l" . meow-till) |
|
|
'("m" . meow-mark-word) |
|
|
'("M" . meow-mark-symbol) |
|
|
'("n" . meow-next) |
|
|
'("N" . meow-next-expand) |
|
|
'("o" . meow-block) |
|
|
'("O" . meow-to-block) |
|
|
'("p" . meow-prev) |
|
|
'("P" . meow-prev-expand) |
|
|
'("q" . meow-quit) |
|
|
'("r" . meow-replace) |
|
|
'("R" . meow-swap-grab) |
|
|
'("s" . meow-search) |
|
|
'("t" . meow-right) |
|
|
'("T" . meow-right-expand) |
|
|
'("u" . meow-undo) |
|
|
'("U" . meow-undo-in-selection) |
|
|
'("v" . meow-visit) |
|
|
'("w" . meow-next-word) |
|
|
'("W" . meow-next-symbol) |
|
|
'("x" . meow-save) |
|
|
'("X" . meow-sync-grab) |
|
|
'("y" . meow-yank) |
|
|
'("z" . meow-pop-selection) |
|
|
'("'" . repeat) |
|
|
'("<escape>" . mode-line-other-buffer))) |
|
|
|
|
|
;;;autoload |
|
|
(defun meow--setup-qwerty () |
|
|
(setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty) |
|
|
(meow-motion-overwrite-define-key |
|
|
'("j" . meow-next) |
|
|
'("k" . meow-prev)) |
|
|
(meow-leader-define-key |
|
|
;; SPC j/k will run the original command in MOTION state. |
|
|
'("j" . "H-j") |
|
|
'("k" . "H-k") |
|
|
;; Use SPC (0-9) for digit arguments. |
|
|
'("1" . meow-digit-argument) |
|
|
'("2" . meow-digit-argument) |
|
|
'("3" . meow-digit-argument) |
|
|
'("4" . meow-digit-argument) |
|
|
'("5" . meow-digit-argument) |
|
|
'("6" . meow-digit-argument) |
|
|
'("7" . meow-digit-argument) |
|
|
'("8" . meow-digit-argument) |
|
|
'("9" . meow-digit-argument) |
|
|
'("0" . meow-digit-argument) |
|
|
'("/" . meow-keypad-describe-key) |
|
|
'("?" . meow-cheatsheet)) |
|
|
(meow-normal-define-key |
|
|
'("0" . meow-expand-0) |
|
|
'("9" . meow-expand-9) |
|
|
'("8" . meow-expand-8) |
|
|
'("7" . meow-expand-7) |
|
|
'("6" . meow-expand-6) |
|
|
'("5" . meow-expand-5) |
|
|
'("4" . meow-expand-4) |
|
|
'("3" . meow-expand-3) |
|
|
'("2" . meow-expand-2) |
|
|
'("1" . meow-expand-1) |
|
|
'("-" . negative-argument) |
|
|
'(";" . meow-reverse) |
|
|
'("," . meow-inner-of-thing) |
|
|
'("." . meow-bounds-of-thing) |
|
|
'("[" . meow-beginning-of-thing) |
|
|
'("]" . meow-end-of-thing) |
|
|
'("a" . meow-append) |
|
|
'("A" . meow-open-below) |
|
|
'("b" . meow-back-word) |
|
|
'("B" . meow-back-symbol) |
|
|
'("c" . meow-change) |
|
|
'("d" . meow-delete) |
|
|
'("D" . meow-backward-delete) |
|
|
'("e" . meow-next-word) |
|
|
'("E" . meow-next-symbol) |
|
|
'("f" . meow-find) |
|
|
'("g" . meow-cancel-selection) |
|
|
'("G" . meow-grab) |
|
|
'("h" . meow-left) |
|
|
'("H" . meow-left-expand) |
|
|
'("i" . meow-insert) |
|
|
'("I" . meow-open-above) |
|
|
'("j" . meow-next) |
|
|
'("J" . meow-next-expand) |
|
|
'("k" . meow-prev) |
|
|
'("K" . meow-prev-expand) |
|
|
'("l" . meow-right) |
|
|
'("L" . meow-right-expand) |
|
|
'("m" . meow-join) |
|
|
'("n" . meow-search) |
|
|
'("o" . meow-block) |
|
|
'("O" . meow-to-block) |
|
|
'("p" . meow-yank) |
|
|
'("q" . meow-quit) |
|
|
'("Q" . meow-goto-line) |
|
|
'("r" . meow-replace) |
|
|
'("R" . meow-swap-grab) |
|
|
'("s" . meow-kill) |
|
|
'("t" . meow-till) |
|
|
'("u" . meow-undo) |
|
|
'("U" . meow-undo-in-selection) |
|
|
'("v" . meow-visit) |
|
|
'("w" . meow-mark-word) |
|
|
'("W" . meow-mark-symbol) |
|
|
'("x" . meow-line) |
|
|
'("X" . meow-goto-line) |
|
|
'("y" . meow-save) |
|
|
'("Y" . meow-sync-grab) |
|
|
'("z" . meow-pop-selection) |
|
|
'("'" . repeat) |
|
|
'("<escape>" . mode-line-other-buffer))) |
|
|
|
|
|
;;;autoload |
|
|
(defun meow--setup-useful-keybindings() |
|
|
(map! :leader |
|
|
;; make doom-leader-buffer-map alive |
|
|
(:prefix-map ("b" . "buffer") |
|
|
:desc "Toggle narrowing" "-" #'doom/toggle-narrow-buffer |
|
|
:desc "Previous buffer" "[" #'previous-buffer |
|
|
:desc "Next buffer" "]" #'next-buffer |
|
|
(:when (featurep! :ui workspaces) |
|
|
:desc "Switch workspace buffer" "b" #'persp-switch-to-buffer |
|
|
:desc "Switch buffer" "B" #'switch-to-buffer) |
|
|
(:unless (featurep! :ui workspaces) |
|
|
:desc "Switch buffer" "b" #'switch-to-buffer) |
|
|
:desc "Clone buffer" "c" #'clone-indirect-buffer |
|
|
:desc "Clone buffer other window" "C" #'clone-indirect-buffer-other-window |
|
|
:desc "Kill buffer" "d" #'kill-current-buffer |
|
|
:desc "ibuffer" "i" #'ibuffer |
|
|
:desc "Kill buffer" "k" #'kill-current-buffer |
|
|
:desc "Kill all buffers" "K" #'doom/kill-all-buffers |
|
|
:desc "Switch to last buffer" "l" #'evil-switch-to-windows-last-buffer |
|
|
:desc "Set bookmark" "m" #'bookmark-set |
|
|
:desc "Delete bookmark" "M" #'bookmark-delete |
|
|
:desc "Next buffer" "n" #'next-buffer |
|
|
:desc "New empty buffer" "N" #'evil-buffer-new |
|
|
:desc "Kill other buffers" "O" #'doom/kill-other-buffers |
|
|
:desc "Previous buffer" "p" #'previous-buffer |
|
|
:desc "Revert buffer" "r" #'revert-buffer |
|
|
:desc "Save buffer" "s" #'basic-save-buffer |
|
|
:desc "Save all buffers" "S" #'evil-write-all |
|
|
:desc "Save buffer as root" "u" #'doom/sudo-save-buffer |
|
|
:desc "Pop up scratch buffer" "x" #'doom/open-scratch-buffer |
|
|
:desc "Switch to scratch buffer" "X" #'doom/switch-to-scratch-buffer |
|
|
:desc "Bury buffer" "z" #'bury-buffer |
|
|
:desc "Kill buried buffers" "Z" #'doom/kill-buried-buffers) |
|
|
) |
|
|
(meow-leader-define-key |
|
|
(cons "f" doom-leader-file-map) |
|
|
(cons "d" doom-leader-code-map) |
|
|
(cons "s" doom-leader-search-map) |
|
|
(cons "b" doom-leader-buffer-map) |
|
|
(cons "o" doom-leader-open-map) |
|
|
(cons "v" doom-leader-versioning-map) |
|
|
(cons "n" doom-leader-notes-map) |
|
|
(cons "p" projectile-command-map) |
|
|
(cons "i" doom-leader-insert-map) |
|
|
(cons "q" doom-leader-quit/restart-map) |
|
|
(cons "h" help-map) |
|
|
(cons "t" doom-leader-toggle-map) |
|
|
(cons "w" doom-leader-workspaces/windows-map) |
|
|
(cons "S" doom-leader-snippets-map) |
|
|
;; With meow, you don't need multiple-cursors anymore |
|
|
;;(cons "M" doom-leader-multiple-cursors-map) |
|
|
) |
|
|
(map! |
|
|
(:when (featurep! :ui workspaces) |
|
|
:n "C-t" #'+workspace/new |
|
|
:n "C-S-t" #'+workspace/display |
|
|
:g "M-1" #'+workspace/switch-to-0 |
|
|
:g "M-2" #'+workspace/switch-to-1 |
|
|
:g "M-3" #'+workspace/switch-to-2 |
|
|
:g "M-4" #'+workspace/switch-to-3 |
|
|
:g "M-5" #'+workspace/switch-to-4 |
|
|
:g "M-6" #'+workspace/switch-to-5 |
|
|
:g "M-7" #'+workspace/switch-to-6 |
|
|
:g "M-8" #'+workspace/switch-to-7 |
|
|
:g "M-9" #'+workspace/switch-to-8 |
|
|
:g "M-0" #'+workspace/switch-to-final |
|
|
))) |