请问,你是如何使用Emacs的原生键位的?

Meow + one-key,基本上不要同时多个键一起按,按顺序按就好了。

(defun meow-setup ()
  (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" . undo)
   '("U" . undo-redo)
   ;; '("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)))

(add-hook 'after-init-hook 'meow-setup)

(meow-global-mode)

(setq meow-use-clipboard t)

(add-to-list 'meow-mode-state-list '(netease-cloud-music-mode . motion))
(add-to-list 'meow-mode-state-list '(osx-dictionary-mode . motion))
(add-to-list 'meow-mode-state-list '(stock-tracker-mode . motion))
(add-to-list 'meow-mode-state-list '(elfeed-show-mode . normal))
(add-to-list 'meow-mode-state-list '(elfeed-summary-mode . motion))
(add-to-list 'meow-mode-state-list '(helpful-mode . normal))
(add-to-list 'meow-mode-state-list '(calibredb-search-mode . motion))
(add-to-list 'meow-mode-state-list '(Info-mode-hook . motion))

;; (advice-add 'org-edit-special :after 'meow-insert)

(require 'one-key)

(setq one-key-popup-window nil)

(meow-leader-define-key '("a" . my/org-agenda))

(one-key-create-menu
 "BIBTEX"
 '((("a" . "Actions") . orb-note-actions)
   (("o" . "open") . consult-bibtex-open-any)
   (("e" . "entry") . consult-bibtex-show-entry)
   (("n" . "note") . my/edit-notes)
   (("x" . "extract annots") . my/extract-pdf-annots-to-ref-note))
 t)

(meow-leader-define-key '("b" . one-key-menu-bibtex))

(one-key-create-menu
 "DIRECTORY"
 '((("c" . "Cloud") . (lambda () (interactive) (dired "~/Nextcloud/")))
   (("d" . "Downloads") . (lambda () (interactive) (dired "~/Downloads/")))
   (("p" . "Pictures") . (lambda () (interactive) (dired "~/Pictures/"))))
 t)

(meow-leader-define-key '("d" . one-key-menu-directory))

(one-key-create-menu
 "FILE"
 '((("f" . "FINANCE") . one-key-menu-beancount)
   (("r" . "recent") . consult-recent-file)
   (("o" . "open") . one-key-menu-specific-file)
   (("e" . "External") . xah-html-open-in-safari))
 t)

(meow-leader-define-key '("f" . one-key-menu-file))

(one-key-create-menu
 "SPECIFIC-FILE"
 '((("b" . "Blog file") . (lambda () (interactive) (find-file "~/hugo-source/content-org/all-posts.org")))
   (("I" . "README.org") . (lambda () (interactive) (find-file (expand-file-name "README.org" user-emacs-directory))))
   (("i" . "Inbox") . (lambda () (interactive) (find-file (expand-file-name "daily/inbox.org" my-galaxy))))
   (("r" . "rss") . (lambda () (interactive) (find-file (expand-file-name "main/elfeed.org" my-roam))))
   (("g" . "gtd") . (lambda () (interactive) (find-file (expand-file-name "todos/org-gtd-tasks.org" my-galaxy))))
   (("a" . "alipay") . (lambda () (interactive) (find-file (expand-file-name "alipay.bean" my-finance-year))))
   (("m" . "Beancount main") . (lambda () (interactive) (find-file (expand-file-name "main.bean" my-finance)))))
 t)

(one-key-create-menu
 "ORG"
 '((("c" . "Capture") . one-key-menu-org-capture)
   (("d" . "Download") . one-key-menu-download)
   (("p" . "Process") . org-gtd-process-inbox)
   (("P" . "Pomodoro") . org-pomodoro)
   (("l" . "cliplink") . org-cliplink)
   (("i" . "ID") . org-id-get-create)
   (("t" . "Transclusion") . one-key-menu-transclusion))
 t)

(meow-leader-define-key '("o" . one-key-menu-org))

(one-key-create-menu
 "DOWNLOAD"
 '((("c" . "clipboard") . org-download-clipboard)
   (("i" . "image") . org-download-image)
   (("r" . "rename") . org-download-rename-at-point)
   (("s" . "screenshot") . org-download-screenshot))
 t)

(one-key-create-menu
 "TRANSCLUSION"
 '((("a" . "Add") . org-transclusion-add)
   (("A" . "Add all") . org-transclusion-add-all)
   (("r" . "Remove") . org-transclusion-remove)
   (("R" . "Remove all") . org-transclusion-remove-all)
   (("g" . "Refresh") . org-transclusion-refresh)
   (("m" . "make") . org-transclusion-make-from-link)
   (("o" . "Open") . org-transclusion-open-source)
   (("e" . "Edit") . org-transclusion-live-sync-start))
 t)

(one-key-create-menu
 "ORG-CAPTURE"
 '((("d" . "Diary") . (lambda () (interactive) (my/org-capture-shortcut "d")))
   (("t" . "Today tasks") . (lambda () (interactive) (my/org-capture-shortcut "tt")))
   (("T" . "Date tasks") . (lambda () (interactive) (my/org-capture-shortcut "td")))
   (("i" . "Inbox") . (lambda () (interactive) (my/org-capture-shortcut "i")))
   (("r" . "Random note") . (lambda () (interactive) (my/org-capture-shortcut "r")))
   (("s" . "Code Snippet") . (lambda () (interactive) (my/org-capture-shortcut "s"))))
 t)

(one-key-create-menu
 "LANGUAGE"
 '((("t" . "Translate") . gts-do-translate)
   (("f" . "Fanyi Point") . fanyi-dwim2)
   (("F" . "Fanyi Input") . fanyi-dwim)
   (("d" . "Dictionary Point") . osx-dictionary-search-pointer)
   (("D" . "Dictionary Input") . osx-dictionary-search-input)
   (("t" . "Thesaurus") . powerthesaurus-lookup-dwim)
   (("s" . "Style region") . smog-check)
   (("S" . "Style buffer") . smog-check-buffer))
 t)

(meow-leader-define-key '("l" . one-key-menu-language))

(one-key-create-menu
 "ROAM"
 '((("a" . "Alias") . one-key-menu-roam-alias)
   (("b" . "Roam Buffer") . my/org-roam-buffer-turn-on-off)
   (("c" . "Roam capture") . org-roam-capture)
   (("d" . "Dailies") . one-key-menu-roam-dailies)
   (("f" . "Node find") . org-roam-node-find)
   (("i" . "Node insert") . org-roam-node-insert)
   (("s" . "Search content") . bms/org-roam-rg-search)
   (("t" . "Tags") . one-key-menu-roam-tags)
   (("r" . "Ref") . one-key-menu-roam-ref)
   (("u" . "UI") . one-key-menu-roam-ui))
 t)

(meow-leader-define-key '("r" . one-key-menu-roam))

(one-key-create-menu
 "ROAM-ALIAS"
 '((("a" . "Add") . org-roam-alias-add)
   (("r" . "Remove") . org-roam-alias-remove))
 t)

(one-key-create-menu
 "ROAM-DAILIES"
 '((("t" . "Today") . org-roam-dailies-find-today)
   (("y" . "Yesterday") . org-roam-dailies-find-yesterday)
   (("d" . "Directory") . org-roam-dailies-find-directory)
   (("j" . "Date") . org-roam-dailies-goto-date)
   (("p" . "Past Diary") . my/history-morning-diary))
 t)

(one-key-create-menu
 "ROAM-REF"
 '((("a" . "Add") . org-roam-ref-add)
   (("f" . "Find") . org-roam-ref-find)
   (("r" . "Remove") . org-roam-ref-remove))
 t)

(one-key-create-menu
 "ROAM-TAGS"
 '((("a" . "Add") . org-roam-tag-add)
   (("c" . "Completion") . org-roam-tag-completions)
   (("r" . "Remove") . org-roam-tag-remove))
 t)

(one-key-create-menu
 "ROAM-UI"
 '((("o" . "Open") . org-roam-ui-open)
   (("l" . "Local") . org-roam-ui-node-local)
   (("z" . "Zome") . org-roam-ui-node-zoom)))

(one-key-create-menu
 "WINDOWS"
 '((("d" . "Destroy") . kill-this-buffer)
   (("h" . "Left") . windmove-left)
   (("j" . "Down") . windmove-down)
   (("k" . "Up") . windmove-up)
   (("l" . "Right") . windmove-right)
   (("e" . "Email") . mu4e)
   (("r" . "RSS") . elfeed-summary)
   (("t" . "Telega") . telega)
   (("m" . "Message") . (lambda () (interactive) (switch-to-buffer "*Messages*")))
   (("s" . "scratch") . (lambda () (interactive) (switch-to-buffer "*scratch*")))
   (("u" . "Winner Undo") . winner-undo)
   (("v" . "vundo") . vundo))
 t)

(meow-leader-define-key '("w" . one-key-menu-windows))

(one-key-create-menu
   "TOOLS"
   '((("o" . "Outline") . consult-outline)
     (("m" . "Menu") . my/imenu-list-on-off))
   t)

(meow-leader-define-key '("t" . one-key-menu-tools))

(one-key-create-menu
   "BLOG"
   '((("h" . "Easy hugo") . easy-hugo)
     (("n" . "New post") . easy-hugo-newpost)
     (("g" . "Magit") . easy-hugo-magit)
     (("p" . "note") . easy-hugo-preview)
     (("t" . "Tags") . easy-hugo-complete-tags))
   t)
7 个赞