2022-05-02 23:32:46 +02:00
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:ID: b88618f2-258f-4f3a-93f7-46fd45bc833f
|
|
|
|
|
:END:
|
|
|
|
|
#+title: Meow
|
|
|
|
|
#+filetags: emacs-load
|
|
|
|
|
|
2022-07-31 11:03:59 +02:00
|
|
|
|
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
|
2022-05-02 23:32:46 +02:00
|
|
|
|
Meow is a modal editing framework, it's a bit like evil but also very different. This keymap is setup for KOY.
|
|
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
2022-09-26 18:39:53 +02:00
|
|
|
|
(defun magic_rb/meow-prev (arg)
|
|
|
|
|
"Runs meow-prev except for some specific cases"
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(pcase major-mode
|
|
|
|
|
('ement-room-list-mode (forward-button (* (or arg 1) -1)))
|
|
|
|
|
(mode (meow-prev arg))))
|
|
|
|
|
|
|
|
|
|
(defun magic_rb/meow-next (arg)
|
|
|
|
|
"Runs meow-prev except for some specific cases"
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(pcase major-mode
|
|
|
|
|
('ement-room-list-mode (forward-button (or arg 1)))
|
|
|
|
|
(mode (meow-next arg))))
|
|
|
|
|
|
2022-10-31 00:50:16 +01:00
|
|
|
|
;; (add-hook #'ement-room-list-mode-hook (lambda () (unless (button-at (point)) (forward-button 1))))
|
2022-09-26 18:39:53 +02:00
|
|
|
|
|
2022-05-02 23:32:46 +02:00
|
|
|
|
(defun meow-setup ()
|
|
|
|
|
(setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty)
|
|
|
|
|
(general-def
|
|
|
|
|
:keymaps 'meow-insert-state-keymap
|
|
|
|
|
"j" (general-key-dispatch 'self-insert-command
|
|
|
|
|
:timeout 0.25
|
|
|
|
|
"j" 'meow-insert-exit))
|
|
|
|
|
(meow-motion-overwrite-define-key
|
2022-09-26 18:39:53 +02:00
|
|
|
|
'("r" . magic_rb/meow-prev)
|
|
|
|
|
'("n" . magic_rb/meow-next)
|
2022-05-02 23:32:46 +02:00
|
|
|
|
'("<escape>" . ignore))
|
|
|
|
|
(meow-leader-define-key
|
2023-01-15 01:16:04 +01:00
|
|
|
|
;; SPC r/n will run the original command in MOTION state.
|
2022-05-02 23:32:46 +02:00
|
|
|
|
'("r" . "H-r")
|
|
|
|
|
'("n" . "H-n")
|
|
|
|
|
;; 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)
|
|
|
|
|
'("d" . meow-reverse)
|
|
|
|
|
'("w" . meow-inner-of-thing)
|
|
|
|
|
'("m" . meow-bounds-of-thing)
|
|
|
|
|
'("z" . meow-beginning-of-thing)
|
|
|
|
|
'("f" . meow-end-of-thing)
|
|
|
|
|
'("h" . meow-append)
|
|
|
|
|
'("H" . meow-open-below)
|
|
|
|
|
'("ö" . meow-back-word)
|
|
|
|
|
'("Ö" . meow-back-symbol)
|
|
|
|
|
'("ä" . meow-change)
|
|
|
|
|
'("e" . meow-delete)
|
|
|
|
|
'("E" . meow-backward-delete)
|
|
|
|
|
'("o" . meow-next-word)
|
|
|
|
|
'("O" . meow-next-symbol)
|
|
|
|
|
'("i" . meow-find)
|
|
|
|
|
'("u" . meow-cancel-selection)
|
|
|
|
|
'("U" . meow-grab)
|
|
|
|
|
'("c" . meow-insert)
|
|
|
|
|
'("C" . meow-open-above)
|
|
|
|
|
|
|
|
|
|
'("t" . meow-left)
|
|
|
|
|
'("T" . meow-left-expand)
|
|
|
|
|
'("r" . meow-prev)
|
|
|
|
|
'("R" . meow-prev-expand)
|
|
|
|
|
'("n" . meow-next)
|
|
|
|
|
'("N" . meow-next-expand)
|
|
|
|
|
'("s" . meow-right)
|
|
|
|
|
'("S" . meow-right-expand)
|
|
|
|
|
|
|
|
|
|
'("p" . meow-join)
|
|
|
|
|
'("b" . meow-search)
|
|
|
|
|
'("l" . meow-block)
|
|
|
|
|
'("L" . meow-to-block)
|
|
|
|
|
'("ß" . meow-clipboard-yank)
|
|
|
|
|
'("k" . meow-quit)
|
|
|
|
|
'("K" . meow-goto-line)
|
|
|
|
|
'("," . meow-replace)
|
|
|
|
|
'("–" . meow-swap-grab)
|
|
|
|
|
'("a" . meow-clipboard-kill)
|
|
|
|
|
'("y" . meow-till)
|
|
|
|
|
'("g" . meow-undo)
|
|
|
|
|
'("G" . meow-undo-in-selection)
|
2022-06-07 17:08:31 +02:00
|
|
|
|
'("ü" . avy-goto-char-2)
|
2022-05-02 23:32:46 +02:00
|
|
|
|
'("." . meow-mark-word)
|
|
|
|
|
'("•" . meow-mark-symbol)
|
|
|
|
|
'("q" . meow-line)
|
|
|
|
|
'("Q" . meow-goto-line)
|
|
|
|
|
'("v" . meow-clipboard-save)
|
|
|
|
|
'("V" . meow-sync-grab)
|
|
|
|
|
'("x" . meow-pop-selection)
|
|
|
|
|
'("D" . repeat)
|
|
|
|
|
'("<escape>" . ignore)))
|
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
|
(use-package meow
|
|
|
|
|
:straight t
|
|
|
|
|
:config
|
|
|
|
|
(meow-setup)
|
|
|
|
|
(meow-global-mode 1))
|
|
|
|
|
#+end_src
|