diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2022-09-27 19:55:04 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2022-09-27 19:55:04 -0400 |
commit | a1339f6d1613ee307cf7d4ab2594d0aac4837aaf (patch) | |
tree | 70c45d2963bc8cae6fc7191899d0862b40b3bc26 /emacs/.config | |
parent | 8684a8d92906692f9d2e954307c06a8c5786f6e2 (diff) |
Migrate doom to chemacs. Start new emacs config
Diffstat (limited to 'emacs/.config')
-rw-r--r-- | emacs/.config/chemacs/profiles.el | 6 | ||||
-rw-r--r-- | emacs/.config/doom-staging/config.el | 365 | ||||
-rw-r--r-- | emacs/.config/doom-staging/init.el | 184 | ||||
-rw-r--r-- | emacs/.config/doom-staging/packages.el | 61 | ||||
-rw-r--r-- | emacs/.config/doom/init.el | 1 | ||||
-rw-r--r-- | emacs/.config/doom/packages.el | 4 | ||||
-rw-r--r-- | emacs/.config/emacs-kj/early-init.el | 1 | ||||
-rw-r--r-- | emacs/.config/emacs-kj/init.el | 338 | ||||
-rw-r--r-- | emacs/.config/emacs-kj/init.el~ | 337 |
9 files changed, 1294 insertions, 3 deletions
diff --git a/emacs/.config/chemacs/profiles.el b/emacs/.config/chemacs/profiles.el new file mode 100644 index 0000000..d134391 --- /dev/null +++ b/emacs/.config/chemacs/profiles.el @@ -0,0 +1,6 @@ +(("default" . ((user-emacs-directory . "~/build/doom-emacs") + (env . (("DOOMDIR" . "~/.config/doom"))))) + ("doom-staging" . ((user-emacs-directory . "~/build/doom-emacs-staging") + (env . (("DOOMDIR" . "~/.config/doom"))))) + ("kj" . ((user-emacs-directory . "~/.config/emacs-kj"))) + ) diff --git a/emacs/.config/doom-staging/config.el b/emacs/.config/doom-staging/config.el new file mode 100644 index 0000000..34e66b5 --- /dev/null +++ b/emacs/.config/doom-staging/config.el @@ -0,0 +1,365 @@ +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;; Place your private configuration here! Remember, you do not need to run 'doom +;; sync' after modifying this file! + +;; Some functionality uses this to identify you, e.g. GPG configuration, email +;; clients, file templates and snippets. +(setq user-full-name "KJ Orbekk" + user-mail-address "kj@orbekk.com") + +(defmacro system-specific-config (system-regex &rest code) + "Run CODE on systems that match SYSTEM-REGEX." + `(when (string-match ,system-regex (system-name)) + ,@code)) + +(setq kj/font-size 16) +(setq doom-theme 'modus-operandi) +(after! modus-themes + (modus-themes-load-themes)) + +;; Completion gets in the way more often than being useful. +(setq company-idle-delay nil) +(setq lsp-ui-doc-enable nil) + +(setq display-line-numbers-type nil) + +;; Scratch buffers are often for lisp stuff. +(setq doom-scratch-initial-major-mode 'lisp-interaction-mode) + +(setq math-additional-units + '((ZiB "1024 * EiB" "Zebibyte") + (EiB "1024 * PiB" "Exbibyte") + (PiB "1024 * TiB" "Pebibyte") + (TiB "1024 * GiB" "Tebibyte") + (GiB "1024 * MiB" "Gibibyte") + (MiB "1024 * KiB" "Mebibyte") + (KiB "1024 * B" "Kibibyte") + (B nil "Byte") + (Zib "1024 * ZiB" "Zebibit") + (Eib "1024 * PiB" "Exbibit") + (Pib "1024 * TiB" "Pebibit") + (Tib "1024 * GiB" "Tebibit") + (Gib "1024 * Mib" "Gibibit") + (Mib "1024 * Kib" "Mebibit") + (Kib "1024 * b" "Kibibit") + (b "B / 8" "Bit"))) + +(system-specific-config + "pincer" + (setq kj/font-size 18) + (setq doom-theme 'doom-one)) + +(system-specific-config + "orbekk" + (setq doom-theme 'doom-solarized-light)) + +(system-specific-config + "^siofra\." + (setq kj/font-size 20) + (setq doom-theme 'doom-one-light)) + +(setq doom-font (font-spec :family "iosevka" :size kj/font-size)) +(setq doom-variable-pitch-font (font-spec :family "Noto Serif" :size kj/font-size)) + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/org/") +(setq org-todo-keywords + '((sequence + "TODO(t)" "ACTIVE(a!)" "WAIT(w@/!)" "|" "DONE(d!)" "CANCELED(c@)"))) +(setq org-refile-use-outline-path nil) +(setq org-refile-targets '((nil . (:maxlevel . 2)))) +(setq org-log-into-drawer t) +(setq org-agenda-log-mode-items '(closed clock state)) +(setq org-agenda-start-day nil) +(setq org-agenda-block-separator nil) +(setq org-agenda-compact-blocks t) +(setq org-agenda-start-with-log-mode nil) +(setq org-habit-show-all-today t) +(setq org-agenda-time-grid '((daily today require-timed) (800 1600) "......" "----------------------")) +(setq org-roam-directory (concat org-directory "roam/")) +(setq-default org-agenda-files '()) +(dolist (file '("tasks.org" + "running-2022.org")) + (add-to-list 'org-agenda-files (concat org-roam-directory file))) +(setq org-roam-db-location (concat org-roam-directory "/org-roam.db")) +(setq org-export-with-toc nil) +(setq deft-directory org-directory) +(setq deft-recursive t) +;; Org html export +(setq org-html-htmlize-output-type 'css) +;; Website publish settings. +(defvar kj/publish-tag "publish") +(defvar kj/publish-directory "/ssh:orbekk@dragon.orbekk.com:/storage/srv/kj.orbekk.com") +(add-to-list 'org-modules 'org-habit) + +; (setq org-appear-autolinks t) +; (use-package! org-appear +; :hook (org-mode . org-appear-mode)) + +(setq org-log-done 'time) +(setq org-todo-keywords + '((sequence + "TODO(t)" ; A task that needs doing & is ready to do + "PROJ(p)" ; A project, which usually contains other tasks + "LOOP(r)" ; A recurring task + "STRT(s)" ; A task that is in progress + "WAIT(w)" ; Something external is holding up this task + "HOLD(h)" ; This task is paused/on hold because of me + "IDEA(i)" ; An unconfirmed and unapproved task or notion + "|" + "DONE(d!)" ; Task successfully completed + "KILL(k)") ; Task was cancelled, aborted or is no longer applicable + (sequence + "[ ](T)" ; A task that needs doing + "[-](S)" ; Task is in progress + "[?](W)" ; Task is being held up or paused + "|" + "[X](D)") ; Task was completed + (sequence + "|" + "OKAY(o)" + "YES(y)" + "NO(n)"))) + +;;(use-package! org-super-agenda +;; :after org-agenda +;; :init +;; +;; (setq org-agenda-custom-commands +;; '(("d" "Daily KJ agenda" +;; ((agenda "" ((org-agenda-span 'day) +;; (org-agenda-start-day nil) +;; (org-super-agenda-groups +;; '((:name "Habits" +;; :habit t +;; :order 2) +;; (:name "Past & Overdue" +;; :scheduled past +;; :deadline past) +;; (:name "Today" +;; :time-grid t +;; :date today) +;; (:name "Due Soon" +;; :scheduled future +;; :deadline future))))) +;; (alltodo "" ((org-agenda-overriding-header "") +;; (org-super-agenda-groups +;; '((:name "Important" +;; :priority "A" +;; :priority "B") +;; (:discard (:habit t)))))))))) +;; +;; :config +;; (org-super-agenda-mode 1)) + +(setq org-journal-file-type 'weekly) +(setq org-journal-dir org-roam-directory) +(setq org-journal-file-format "journal-%Y-%m-%d.org") +(setq org-journal-enable-agenda-integration t) +(defun kj/org-journal-init () + (interactive) + (save-excursion + (goto-char (point-min)) + (org-id-get-create) + (org-set-property "category" "journal"))) + +(defun kj/org-journal-file-header (time) + (format-time-string "#+title: Week of %F (%W)\n" + (org-journal--convert-time-to-file-type-time time))) +(setq org-journal-file-header #'kj/org-journal-file-header) +(add-hook 'org-journal-after-header-create-hook 'kj/org-journal-init) + +;; Allow more keys when navigating with avy. +(setq avy-keys '(?a ?o ?e ?u ?d ?h ?n ?s ?l ?, ?. ?p ?r)) +(setq avy-timeout-seconds 0.4) + +;; Low menu delay. +(setq which-key-idle-delay .5) + +;; Allow longer output in compilation buffer. +(setq comint-buffer-maximum-size 10000) + +;; Replace values in an alist from a list of replacements. +;; +;; Example: +;; (kj/assq-replace '((:a . 1)) '((:a . 2))) +(defun kj/assq-replace (replacements alist) + (let ((replace1 (lambda (aelem alist) + (cons aelem (assq-delete-all (car aelem) alist))))) + (if replacements + (kj/assq-replace (cdr replacements) + (funcall replace1 (car replacements) alist)) + alist))) + +(server-start) +(remove-hook 'doom-first-buffer-hook #'smartparens-global-mode) +(add-to-list 'auto-mode-alist '("\\.journal\\'" . ledger-mode)) + +;; Make ace window more visible +(custom-set-faces! + '(aw-leading-char-face + :foreground "white" :background "red" + :weight bold :height 2.5 :box (:line-width 10 :color "red"))) + +(after! racket-mode + (remove-hook! 'racket-mode #'racket-smart-open-bracket-mode)) + +(after! org + (add-hook 'org-mode-hook 'mixed-pitch-mode) + (setq org-roam-mode-section-functions + (list #'org-roam-backlinks-section + #'org-roam-reflinks-section + #'org-roam-unlinked-references-section)) + + (add-to-list 'org-structure-template-alist + '("se" . "src emacs-lisp")) + + (setq org-babel-default-header-args + (kj/assq-replace '((:exports . "both") + (:eval . "never-export") + (:output-dir . "static/data/")) + org-babel-default-header-args)) + + (defun kj/org-journal-find-location () + ;; Open today's journal, but specify a non-nil prefix argument in order to + ;; inhibit inserting the heading; org-capture will insert the heading. + (org-journal-new-entry t)) + ;; (unless (eq org-journal-file-type 'daily) + ;; (org-narrow-to-subtree)) + ;; (goto-char (point-max))) + + (defun kj/org-journal-narrowed-location () + ;; Open today's journal, but specify a non-nil prefix argument in order to + ;; inhibit inserting the heading; org-capture will insert the heading. + (org-journal-new-entry t) + (unless (eq org-journal-file-type 'daily) + (org-narrow-to-subtree)) + (goto-char (point-max))) + + (setq org-capture-templates + `(("g" "Go to current journal entry" plain (function kj/org-journal-find-location) + "%i%?" :jump-to-captured t :immediate-finish t) + ("t" "Create a TODO" entry (file+headline "~/org/roam/tasks.org" "Inbox") + "** TODO %?\n%i\n%a") + ("w" "Log bodyweight" table-line + (file+headline ,(concat org-roam-directory "bodyweight.org") + "Body weight log") + "| %t | %^{Weight} | |" + :prepend t :immediate-finish t))) + + (defun kj/find-agenda-files-containing-tag (tag) + (setq org-agenda-archives-mode nil) + (let* ((org-agenda-archives-mode nil) + (candidates (org-agenda-files nil 'ifmode)) + (matcher (cdr (org-make-tags-matcher tag))) + (files)) + ;; (message "Results:") + (dolist (file candidates files) + (org-check-agenda-file file) + (with-current-buffer (org-get-agenda-file-buffer file) + ;; (message "%S" (org-scan-tags 'agenda matcher nil)) + (when (org-scan-tags 'agenda matcher nil) + (push file files)))))) + + (setq kj/inbox-path "/ssh:dragon.orbekk.com:/storage/srv/kj.orbekk.com/dav/Inbox.org") + + (defun kj/fetch-inbox () + (interactive) + (let ((content (with-current-buffer (find-file-noselect kj/inbox-path) + (buffer-string)))) + (kj/org-journal-find-location) + (when (not (string-empty-p content)) + (org-paste-subtree nil content))) + (with-current-buffer (find-file-noselect kj/inbox-path) + (erase-buffer) + (save-buffer) + (kill-buffer))) + + (defvar org-publish-project-alist) + (defun kj/org-publish (&optional project force) + (interactive) + (setq project (or project "all")) + (setq force (or force current-prefix-arg)) + (setq org-agenda-files (list org-roam-directory)) + (let* ((static-files-re (string-join '("css" "txt" "jpg" "png" "gif" "svg") "\\|")) + (files-to-include (kj/find-agenda-files-containing-tag kj/publish-tag)) + ;; Disable org babel exports during publish entirely to speed up publish. + ;; This messes up babel output handling. + ;; (org-export-use-babel nil) + (org-babel-default-header-args + (kj/assq-replace '((:exports . "both") + (:eval . "never-export")) + org-babel-default-header-args)) + (org-publish-project-alist + `( + ("static" + :base-directory ,(concat org-roam-directory "/static") + :base-extension ,static-files-re + :recursive t + :publishing-directory ,(concat kj/publish-directory "/static") + :publishing-function org-publish-attachment) + ("source" + :base-directory ,org-roam-directory + :base-extension "org" + :exclude ".*" + :include ,files-to-include + :recursive t + :publishing-directory ,kj/publish-directory + :publishing-function org-publish-attachment) + ("html" + :base-directory ,org-roam-directory + :base-extension "org" + :recursive t + :exclude ".*" + :include ,files-to-include + :publishing-directory ,kj/publish-directory + :publishing-function org-html-publish-to-html + + :with-broken-links t + :with-toc nil + :with-latex t + :with-drawers t + :with-title t + :section-numbers nil + + ;; HTML options + :html-toplevel-hlevel 2 + :html-preamble "" + :html-postamble "" + :html-html5-fancy t + :html-doctype "html5" + :html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"static/org.css\"/>" + :html-head-include-scripts nil + :html-head-include-default-style nil + :html-container article) + + ("all" :components ("static" "source" "html"))))) + + (org-publish project force)))) + +(setq aw-dispatch-always t) + +;;; Keybindings +(map! (:after evil-org + :leader "n P" #'kj/org-publish) + + (:leader + :desc "window" "e" evil-window-map) + + (:map evil-window-map + "e" #'ace-window)) + +(add-hook 'eshell-mode-hook + (lambda () + (setenv "PAGER" "cat")) + (setenv "EDITOR" "emacsclient")) + +(after! evil-embrace + (evil-embrace-enable-evil-surround-integration) + (setq evil-embrace-show-help-p t)) + +(let ((local-config "~/.doom.d/config.local.el")) + (when (file-exists-p local-config) + (load-file local-config))) diff --git a/emacs/.config/doom-staging/init.el b/emacs/.config/doom-staging/init.el new file mode 100644 index 0000000..0e8a2ef --- /dev/null +++ b/emacs/.config/doom-staging/init.el @@ -0,0 +1,184 @@ +;;; init.el -*- lexical-binding: t; -*- + +;; This file controls what Doom modules are enabled and what order they load +;; in. Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find information about all of Doom's +;; modules and what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c g k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). +;; +;; Alternatively, press 'gd' (or 'C-c g d') on a module to browse its +;; directory (for easy access to its source code). +(let ((local-config "~/.doom.d/init.local.el")) + (when (file-exists-p local-config) + (load-file local-config))) + +(doom! :input + ;;chinese + ;;japanese + + :completion + company ; the ultimate code completion backend + ;;helm ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ;;ivy ; a search engine for love and life + vertico ; the search engine of the future + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + doom-dashboard ; a nifty splash screen for Emacs + ;;doom-quit ; DOOM quit-message prompts when you quit Emacs + ;;fill-column ; a `fill-column' indicator + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + ;;hydra + ;;indent-guides ; highlighted indent columns + ;;minimap ; show a map of the code on the side + (modeline +light) ; snazzy, Atom-inspired modeline, plus API + ;;nav-flash ; blink cursor line after big motions + ;;neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;pretty-code ; ligatures or substitute text with pretty symbols + ;;tabs ; an tab bar for Emacs + treemacs ; a project drawer, like neotree but cooler + ;;unicode ; extended unicode support for various languages + vc-gutter ; vcs diff in the fringe + vi-tilde-fringe ; fringe tildes to mark beyond EOB + (window-select +numbers) ; visually switch windows + ;;workspaces ; tab emulation, persistence & separate workspaces + zen ; distraction-free coding or writing + ;; (emoji +unicode) ; 😇 + + :editor + ;;(evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + format ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + ;;word-wrap ; soft wrapping with language-aware indent + + :emacs + dired ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ;;ibuffer ; interactive buffer management + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + eshell ; the elisp shell that works everywhere + shell ; simple shell REPL for Emacs + ;;term ; basic terminal emulator for Emacs + ;;vterm ; the best terminal emulation in Emacs + + :checkers + ;;syntax ; tasing you for every semicolon you forget + ;;spell ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + ;;debugger ; FIXME stepping through code, to help you add bugs + direnv + ;;docker + editorconfig ; let someone else argue about tabs vs spaces + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + ;;gist ; interacting with github gists + lookup ; navigate your code and its documentation + lsp + ;;macos ; MacOS-specific commands + magit ; a git porcelain for Emacs + ;;make ; run make tasks from Emacs + pass ; password manager for nerds + ;;pdf ; pdf enhancements + ;;prodigy ; FIXME managing external services & code builders + rgb ; creating color strings + ;;taskrunner ; taskrunner for all your projects + ;;terraform ; infrastructure as code + ;;tmux ; an API for interacting with tmux + ;;upload ; map local to remote projects via ssh/ftp + + :lang + ;;agda ; types of types of types of types... + (cc +lsp) ; C/C++/Obj-C madness + clojure ; java with a lisp + ;;common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + ;;csharp ; unity, .NET, and mono shenanigans + data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + (ess +lsp) ; emacs speaks statistics + ;;faust ; dsp, but you get to keep your soul + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + ;;(go +lsp) ; the hipster dialect + (haskell +dante) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; + ;;json ; At least it ain't XML + ;;(java +meghanada) ; the poster child for carpal tunnel syndrome + ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;;julia ; a better, faster MATLAB + ;;kotlin ; a better, slicker Java(Script) + ;;latex ; writing papers in Emacs has never been so fun + ;;lean + ;;factor + ledger ; an accounting system in Emacs + ;;lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + nix ; I hereby declare "nix geht mehr!" + ;;ocaml ; an objective camel + (org +journal +roam2) ; organize your plain life in plain text + ;;perl ; write code no one else can comprehend + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + ;;purescript ; javascript, but functional + python ; beautiful is better than ugly + ;;qt ; the 'cutest' gui framework ever + racket ; a DSL for DSLs + ;;rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;scheme ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + web ; the tubes + ;;yaml ; JSON, but readable + + :email + ;;mu4e + ;;notmuch + ;;(wanderlust +gmail) + + :app + everywhere + ;;calendar + ;;irc ; how neckbeards socialize + ;;(rss +org) ; emacs as an RSS reader + ;;twitter ; twitter client https://twitter.com/vnought + + :config + ;;literate + (default +bindings)) diff --git a/emacs/.config/doom-staging/packages.el b/emacs/.config/doom-staging/packages.el new file mode 100644 index 0000000..477cf1a --- /dev/null +++ b/emacs/.config/doom-staging/packages.el @@ -0,0 +1,61 @@ +;; -*- no-byte-compile: t; -*- +;;; $DOOMDIR/packages.el + +;; To install a package with Doom you must declare them here, run 'doom sync' on +;; the command line, then restart Emacs for the changes to take effect. +;; Alternatively, use M-x doom/reload. + + +;; Doom's packages are pinned to a specific commit and updated from release to +;; release. The `unpin!' macro allows you to unpin single packages... +;(unpin! pinned-package) +;; ...or multiple packages +;(unpin! pinned-package another-pinned-package) +;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) +;(unpin! t) + + +;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: +;(package! some-package) + +;; To install a package directly from a particular repo, you'll need to specify +;; a `:recipe'. You'll find documentation on what `:recipe' accepts here: +;; https://github.com/raxod502/straight.el#the-recipe-format +;(package! another-package +; :recipe (:host github :repo "username/repo")) + +;; If the package you are trying to install does not contain a PACKAGENAME.el +;; file, or is located in a subdirectory of the repo, you'll need to specify +;; `:files' in the `:recipe': +;(package! this-package +; :recipe (:host github :repo "username/repo" +; :files ("some-file.el" "src/lisp/*.el"))) + +;; If you'd like to disable a package included with Doom, for whatever reason, +;; you can do so here with the `:disable' property: +;(package! builtin-package :disable t) + +;; You can override the recipe of a built in package without having to specify +;; all the properties for `:recipe'. These will inherit the rest of its recipe +;; from Doom or MELPA/ELPA/Emacsmirror: +;(package! builtin-package :recipe (:nonrecursive t)) +;(package! builtin-package-2 :recipe (:repo "myfork/package")) + +;; Specify a `:branch' to install a package from a particular branch or tag. +;; This is required for some packages whose default branch isn't 'master' (which +;; our package manager can't deal with; see raxod502/straight.el#279) +;(package! builtin-package :recipe (:branch "develop")) + +;; (package! hledger-mode) + +;; Enabled for AoC 2021. +(package! heap) + +(package! modus-themes) + +; (package! org-appear) +; (package! org-super-agenda) + +(let ((local-config "~/.doom.d/packages.local.el")) + (when (file-exists-p local-config) + (load-file local-config))) diff --git a/emacs/.config/doom/init.el b/emacs/.config/doom/init.el index c0a6560..7d37eae 100644 --- a/emacs/.config/doom/init.el +++ b/emacs/.config/doom/init.el @@ -55,6 +55,7 @@ ;; (emoji +unicode) ; 😇 :editor + ;(meow +dvorak +override +keypad) (evil +everywhere); come to the dark side, we have cookies file-templates ; auto-snippets for empty files fold ; (nigh) universal code folding diff --git a/emacs/.config/doom/packages.el b/emacs/.config/doom/packages.el index 477cf1a..eb942d3 100644 --- a/emacs/.config/doom/packages.el +++ b/emacs/.config/doom/packages.el @@ -48,10 +48,8 @@ ;; (package! hledger-mode) -;; Enabled for AoC 2021. -(package! heap) - (package! modus-themes) +(package! meow) ; (package! org-appear) ; (package! org-super-agenda) diff --git a/emacs/.config/emacs-kj/early-init.el b/emacs/.config/emacs-kj/early-init.el new file mode 100644 index 0000000..512068a --- /dev/null +++ b/emacs/.config/emacs-kj/early-init.el @@ -0,0 +1 @@ +(setq package-enable-at-startup nil) diff --git a/emacs/.config/emacs-kj/init.el b/emacs/.config/emacs-kj/init.el new file mode 100644 index 0000000..4e5a05d --- /dev/null +++ b/emacs/.config/emacs-kj/init.el @@ -0,0 +1,338 @@ +;;; -*- lexical-binding: t; -*- +(setq straight-check-for-modifications nil) +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 6)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) + +(defalias 'yes-or-no-p 'y-or-n-p) + +(straight-use-package 'use-package) +(use-package straight + :custom (straight-use-package-by-default t)) + +(set-frame-font "Iosevka-18") + +;; Modus theme setup. +(use-package emacs + :init + ;; Add all your customizations prior to loading the themes + (setq modus-themes-region '(bg-only)) + :config + ;; Load the theme of your choice: + (load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi) + :bind ("<f5>" . modus-themes-toggle)) + +(when window-system + (tool-bar-mode -1) + (scroll-bar-mode -1) + (tooltip-mode -1) + (menu-bar-mode -1)) + +(column-number-mode) +(set-fringe-mode 10) +(setq next-screen-context-lines 10) + +(use-package avy + :bind + (("C-c l" . avy-goto-char) + ("C-c n" . avy-goto-line)) + :config + (setq avy-keys '(?a ?o ?e ?u ?i ?d ?h ?t ?n ?s)) + ) + +(use-package ace-window + :bind + (("C-c e" . ace-window)) + :config + (setq aw-dispatch-always t) + (setq aw-keys '(?a ?o ?e ?u ?i ?d ?h ?t ?n ?s)) ;; dvorak moment + ) + +(use-package selectrum + :init + (selectrum-mode +1)) + +(define-key key-translation-map "\C-u" "\C-x") +(define-key key-translation-map "\C-x" "\C-u") + +(use-package marginalia + :bind + (:map minibuffer-local-map + ("M-n" . marginalia-cycle)) + :init + (marginalia-mode)) + +(use-package embark + :ensure t + + :bind + (("C-." . embark-act) + ("C-;" . embark-dwim) + ("C-h C-b" . embark-bindings)) + + :init + (setq prefix-help-command #'embark-prefix-help-command) + + :config + + ;; Hide the mode line of the Embark live/completions buffers + (add-to-list 'display-buffer-alist + '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*" + nil + (window-parameters (mode-line-format . none))))) + +(use-package embark-consult + :ensure t + :after (embark consult) + :demand t + :hook (embark-mode-hook . consult-preview-at-point-mode)) + +;; For editing grep buffers. +(use-package wgrep) + +;; For recent files. +(recentf-mode 1) +(run-at-time nil (* 5 60) 'recentf-save-list) + +(use-package projectile + :init + (projectile-global-mode)) + +;; Example configuration for Consult +(use-package consult + ;; Replace bindings. Lazily loaded due by `use-package'. + :bind (;; C-c bindings (mode-specific-map) + ("C-c h" . consult-history) + ("C-c m" . consult-mode-command) + ("C-c k" . consult-kmacro) + ;; C-x bindings (ctl-x-map) + ("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command + ("C-x b" . consult-buffer) ;; orig. switch-to-buffer + ("C-x C-b" . consult-buffer) ;; orig. switch-to-buffer + ("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window + ("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame + ("C-x r b" . consult-bookmark) ;; orig. bookmark-jump + ("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer + ("C-c f r" . consult-recent-file) + ;; Custom M-# bindings for fast register access + ("M-#" . consult-register-load) + ("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated) + ("C-M-#" . consult-register) + ;; Other custom bindings + ("M-y" . consult-yank-pop) ;; orig. yank-pop + ("<help> a" . consult-apropos) ;; orig. apropos-command + ;; M-g bindings (goto-map) + ("M-g e" . consult-compile-error) + ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck + ("M-g g" . consult-goto-line) ;; orig. goto-line + ("M-g M-g" . consult-goto-line) ;; orig. goto-line + ("M-g o" . consult-outline) ;; Alternative: consult-org-heading + ("M-g m" . consult-mark) + ("M-g k" . consult-global-mark) + ("M-g i" . consult-imenu) + ("M-g I" . consult-imenu-multi) + ;; M-s bindings (search-map) + ("M-s d" . consult-find) + ("M-s D" . consult-locate) + ("M-s g" . consult-grep) + ("M-s G" . consult-git-grep) + ("M-s r" . consult-ripgrep) + ("M-s l" . consult-line) + ("M-s L" . consult-line-multi) + ("M-s m" . consult-multi-occur) + ("M-s k" . consult-keep-lines) + ("M-s u" . consult-focus-lines) + ;; Isearch integration + ("M-s e" . consult-isearch-history) + :map isearch-mode-map + ("M-e" . consult-isearch-history) ;; orig. isearch-edit-string + ("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string + ("M-s l" . consult-line) ;; needed by consult-line to detect isearch + ("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch + ;; Minibuffer history + :map minibuffer-local-map + ("M-s" . consult-history) ;; orig. next-matching-history-element + ("M-r" . consult-history)) ;; orig. previous-matching-history-element + + ;; Enable automatic preview at point in the *Completions* buffer. This is + ;; relevant when you use the default completion UI. + :hook (completion-list-mode . consult-preview-at-point-mode) + + ;; The :init configuration is always executed (Not lazy) + :init + + ;; Optionally configure the register formatting. This improves the register + ;; preview for `consult-register', `consult-register-load', + ;; `consult-register-store' and the Emacs built-ins. + (setq register-preview-delay 0.5 + register-preview-function #'consult-register-format) + + ;; Optionally tweak the register preview window. + ;; This adds thin lines, sorting and hides the mode line of the window. + (advice-add #'register-preview :override #'consult-register-window) + + ;; Use Consult to select xref locations with preview + (setq xref-show-xrefs-function #'consult-xref + xref-show-definitions-function #'consult-xref) + + ;; Configure other variables and modes in the :config section, + ;; after lazily loading the package. + :config + + ;; Optionally configure preview. The default value + ;; is 'any, such that any key triggers the preview. + ;; (setq consult-preview-key 'any) + ;; (setq consult-preview-key (kbd "M-.")) + ;; (setq consult-preview-key (list (kbd "<S-down>") (kbd "<S-up>"))) + ;; For some commands and buffer sources it is useful to configure the + ;; :preview-key on a per-command basis using the `consult-customize' macro. + (consult-customize + consult-theme + :preview-key '(:debounce 0.2 any) + consult-ripgrep consult-git-grep consult-grep + consult-bookmark consult-recent-file consult-xref + consult--source-bookmark consult--source-recent-file + consult--source-project-recent-file + :preview-key (kbd "M-.")) + + ;; Optionally configure the narrowing key. + ;; Both < and C-+ work reasonably well. + (setq consult-narrow-key "<") ;; (kbd "C-+") + + ;; Optionally make narrowing help available in the minibuffer. + ;; You may want to use `embark-prefix-help-command' or which-key instead. + ;; (define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help) + + ;; By default `consult-project-function' uses `project-root' from project.el. + ;; Optionally configure a different project root function. + ;; There are multiple reasonable alternatives to chose from. + ;;;; 1. project.el (the default) + ;; (setq consult-project-function #'consult--default-project--function) + ;;;; 2. projectile.el (projectile-project-root) + (autoload 'projectile-project-root "projectile") + (setq consult-project-function (lambda (_) (projectile-project-root))) + ;;;; 3. vc.el (vc-root-dir) + ;; (setq consult-project-function (lambda (_) (vc-root-dir))) + ;;;; 4. locate-dominating-file + ;; (setq consult-project-function (lambda (_) (locate-dominating-file "." ".git"))) +) + +(use-package orderless + :ensure t + :custom + (completion-styles '(orderless basic)) + (completion-category-overrides '((file (styles basic partial-completion))))) + +(use-package which-key + :init + (which-key-mode)) + +(use-package magit) +(use-package org) + +(defun meow-setup () + (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) + '("p" . projectile-command-map)) + (meow-motion-overwrite-define-key + ;; custom keybinding for motion state + '("<escape>" . ignore)) + (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) + '("/" . isearch-forward) + '("?" . isearch-backward) + '("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) + '("P" . (lambda () (interactive) (forward-line -10))) + '("N" . (lambda () (interactive) (forward-line 10))) + '("'" . repeat) + '("<escape>" . ignore))) + +(use-package meow + :bind + :config + (meow-setup) + (meow-global-mode 1) + (meow-setup-indicator) + (setq meow-use-clipboard t) + (add-to-list 'meow-keypad-start-keys '(?u . ?x)) + (add-to-list 'meow-keypad-start-keys '(?x . ?u)) + (define-key meow-insert-state-keymap "\C-[" #'meow-insert-exit) + ) diff --git a/emacs/.config/emacs-kj/init.el~ b/emacs/.config/emacs-kj/init.el~ new file mode 100644 index 0000000..93668a0 --- /dev/null +++ b/emacs/.config/emacs-kj/init.el~ @@ -0,0 +1,337 @@ +;;; -*- lexical-binding: t; -*- +(setq straight-check-for-modifications nil) +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 6)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) + +(defalias 'yes-or-no-p 'y-or-n-p) + +(straight-use-package 'use-package) +(use-package straight + :custom (straight-use-package-by-default t)) + +(set-frame-font "Iosevka-18") + +;; Modus theme setup. +(use-package emacs + :init + ;; Add all your customizations prior to loading the themes + (setq modus-themes-region '(bg-only)) + :config + ;; Load the theme of your choice: + (load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi) + :bind ("<f5>" . modus-themes-toggle)) + +(when window-system + (tool-bar-mode -1) + (scroll-bar-mode -1) + (tooltip-mode -1) + (menu-bar-mode -1)) + +(column-number-mode) +(set-fringe-mode 10) +(setq next-screen-context-lines 10) + +(use-package avy + :bind + (("C-c l" . avy-goto-char) + ("C-c n" . avy-goto-line)) + :config + (setq avy-keys '(?a ?o ?e ?u ?i ?d ?h ?t ?n ?s)) + ) + +(use-package ace-window + :bind + (("C-c e" . ace-window)) + :config + (setq aw-dispatch-always t) + (setq aw-keys '(?a ?o ?e ?u ?i ?d ?h ?t ?n ?s)) ;; dvorak moment + ) + +(use-package selectrum + :init + (selectrum-mode +1)) + +(define-key key-translation-map "\C-u" "\C-x") +(define-key key-translation-map "\C-x" "\C-u") + +(use-package marginalia + :bind + (:map minibuffer-local-map + ("M-n" . marginalia-cycle)) + :init + (marginalia-mode)) + +(use-package embark + :ensure t + + :bind + (("C-." . embark-act) + ("C-;" . embark-dwim) + ("C-h C-b" . embark-bindings)) + + :init + (setq prefix-help-command #'embark-prefix-help-command) + + :config + + ;; Hide the mode line of the Embark live/completions buffers + (add-to-list 'display-buffer-alist + '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*" + nil + (window-parameters (mode-line-format . none))))) + +(use-package embark-consult + :ensure t + :after (embark consult) + :demand t + :hook (embark-mode-hook . consult-preview-at-point-mode)) + +;; For editing grep buffers. +(use-package wgrep) + +;; For recent files. +(recentf-mode 1) +(run-at-time nil (* 5 60) 'recentf-save-list) + +(use-package projectile + :init + (projectile-global-mode)) + +;; Example configuration for Consult +(use-package consult + ;; Replace bindings. Lazily loaded due by `use-package'. + :bind (;; C-c bindings (mode-specific-map) + ("C-c h" . consult-history) + ("C-c m" . consult-mode-command) + ("C-c k" . consult-kmacro) + ;; C-x bindings (ctl-x-map) + ("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command + ("C-x b" . consult-buffer) ;; orig. switch-to-buffer + ("C-x C-b" . consult-buffer) ;; orig. switch-to-buffer + ("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window + ("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame + ("C-x r b" . consult-bookmark) ;; orig. bookmark-jump + ("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer + ("C-c f r" . consult-recent-file) + ;; Custom M-# bindings for fast register access + ("M-#" . consult-register-load) + ("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated) + ("C-M-#" . consult-register) + ;; Other custom bindings + ("M-y" . consult-yank-pop) ;; orig. yank-pop + ("<help> a" . consult-apropos) ;; orig. apropos-command + ;; M-g bindings (goto-map) + ("M-g e" . consult-compile-error) + ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck + ("M-g g" . consult-goto-line) ;; orig. goto-line + ("M-g M-g" . consult-goto-line) ;; orig. goto-line + ("M-g o" . consult-outline) ;; Alternative: consult-org-heading + ("M-g m" . consult-mark) + ("M-g k" . consult-global-mark) + ("M-g i" . consult-imenu) + ("M-g I" . consult-imenu-multi) + ;; M-s bindings (search-map) + ("M-s d" . consult-find) + ("M-s D" . consult-locate) + ("M-s g" . consult-grep) + ("M-s G" . consult-git-grep) + ("M-s r" . consult-ripgrep) + ("M-s l" . consult-line) + ("M-s L" . consult-line-multi) + ("M-s m" . consult-multi-occur) + ("M-s k" . consult-keep-lines) + ("M-s u" . consult-focus-lines) + ;; Isearch integration + ("M-s e" . consult-isearch-history) + :map isearch-mode-map + ("M-e" . consult-isearch-history) ;; orig. isearch-edit-string + ("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string + ("M-s l" . consult-line) ;; needed by consult-line to detect isearch + ("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch + ;; Minibuffer history + :map minibuffer-local-map + ("M-s" . consult-history) ;; orig. next-matching-history-element + ("M-r" . consult-history)) ;; orig. previous-matching-history-element + + ;; Enable automatic preview at point in the *Completions* buffer. This is + ;; relevant when you use the default completion UI. + :hook (completion-list-mode . consult-preview-at-point-mode) + + ;; The :init configuration is always executed (Not lazy) + :init + + ;; Optionally configure the register formatting. This improves the register + ;; preview for `consult-register', `consult-register-load', + ;; `consult-register-store' and the Emacs built-ins. + (setq register-preview-delay 0.5 + register-preview-function #'consult-register-format) + + ;; Optionally tweak the register preview window. + ;; This adds thin lines, sorting and hides the mode line of the window. + (advice-add #'register-preview :override #'consult-register-window) + + ;; Use Consult to select xref locations with preview + (setq xref-show-xrefs-function #'consult-xref + xref-show-definitions-function #'consult-xref) + + ;; Configure other variables and modes in the :config section, + ;; after lazily loading the package. + :config + + ;; Optionally configure preview. The default value + ;; is 'any, such that any key triggers the preview. + ;; (setq consult-preview-key 'any) + ;; (setq consult-preview-key (kbd "M-.")) + ;; (setq consult-preview-key (list (kbd "<S-down>") (kbd "<S-up>"))) + ;; For some commands and buffer sources it is useful to configure the + ;; :preview-key on a per-command basis using the `consult-customize' macro. + (consult-customize + consult-theme + :preview-key '(:debounce 0.2 any) + consult-ripgrep consult-git-grep consult-grep + consult-bookmark consult-recent-file consult-xref + consult--source-bookmark consult--source-recent-file + consult--source-project-recent-file + :preview-key (kbd "M-.")) + + ;; Optionally configure the narrowing key. + ;; Both < and C-+ work reasonably well. + (setq consult-narrow-key "<") ;; (kbd "C-+") + + ;; Optionally make narrowing help available in the minibuffer. + ;; You may want to use `embark-prefix-help-command' or which-key instead. + ;; (define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help) + + ;; By default `consult-project-function' uses `project-root' from project.el. + ;; Optionally configure a different project root function. + ;; There are multiple reasonable alternatives to chose from. + ;;;; 1. project.el (the default) + ;; (setq consult-project-function #'consult--default-project--function) + ;;;; 2. projectile.el (projectile-project-root) + (autoload 'projectile-project-root "projectile") + (setq consult-project-function (lambda (_) (projectile-project-root))) + ;;;; 3. vc.el (vc-root-dir) + ;; (setq consult-project-function (lambda (_) (vc-root-dir))) + ;;;; 4. locate-dominating-file + ;; (setq consult-project-function (lambda (_) (locate-dominating-file "." ".git"))) +) + +(use-package orderless + :ensure t + :custom + (completion-styles '(orderless basic)) + (completion-category-overrides '((file (styles basic partial-completion))))) + +(use-package which-key + :init + (which-key-mode)) + +(use-package magit) +(use-package org) + +(defun meow-setup () + (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) + '("p" . projectile-command-map)) + (meow-motion-overwrite-define-key + ;; custom keybinding for motion state + '("<escape>" . ignore)) + (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) + '("/" . isearch-forward) + '("?" . isearch-backward) + '("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) + '("P" . (lambda () (interactive) (forward-line -10))) + '("N" . (lambda () (interactive) (forward-line 10))) + '("'" . repeat) + '("<escape>" . ignore))) + +(use-package meow + :bind + :config + (meow-setup) + (meow-global-mode 1) + (setq meow-use-clipboard t) + (add-to-list 'meow-keypad-start-keys '(?u . ?x)) + (add-to-list 'meow-keypad-start-keys '(?x . ?u)) + (define-key meow-insert-state-keymap "\C-[" #'meow-insert-exit) + ) |