dot-emacs

My emacs dotfiles/config
git clone git://git.ethandl.dev/dot-emacs
Log | Files | Refs

commit 65e880725b3751a8c25cd432c44803594515ddb6
parent a9ee02d4a701f9b9a37272a9c4763920312bd2c3
Author: Ethan Long <ethandavidlong@gmail.com>
Date:   Sat, 17 Aug 2024 01:07:34 +1000

Using meow now for modal editing :)

Diffstat:
Mconfig.org | 177+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
Mearly-init.el | 2++
2 files changed, 140 insertions(+), 39 deletions(-)

diff --git a/config.org b/config.org @@ -191,43 +191,46 @@ Some configuration for the LaTeX that appears in Org mode. We want to make sure * General Emacs/Editor settings We can use ~use-package~ to configure emacs at startup. On MacOS we leave things mostly default because emacs-mac doesn't look fugly, but on Linux we might as well get rid of all the clutter. Also we use spaces not tabs, begone tabs. #+begin_src emacs-lisp - ;; Emacs init config - (use-package emacs - :ensure nil - :hook - (prog-mode . display-line-numbers-mode) - (display-line-numbers-mode . ethandl/line-nums-cfg) - (before-save . ethandl/before-save-hook) - (find-file . ethandl/define-indents) - :init - (ethandl/set-fonts code-font) ;; Set fonts - ;; Get rid of default crud - (setq inhibit-startup-screen t) - (menu-bar-mode 1) - (tool-bar-mode 1) - (when (fboundp 'scroll-bar-mode) - (scroll-bar-mode 0)) - (setq frame-resize-pixelwise t) - ;; Modeline - (line-number-mode 1) ;; Line no. - (column-number-mode 1) ;; Col. no. - ;; Indentation - (setq-default indent-tabs-mode nil) - (setq-default tab-width 4) - (setq-default evil-shift-width tab-width) - (setq ring-bell-function 'ignore) ;; Get rid of the bell - ;; Fuck Control+Scroll to zoom, that's terrible and seems to be bound by something in emacs-plus? - (global-unset-key (kbd "<C-wheel-up>")) - (global-unset-key (kbd "<C-wheel-down>")) - ;; Autosave files need to piss off - (setq backup-directory-alist - `((".*" . ,temporary-file-directory))) - (setq auto-save-file-name-transforms - `((".*" ,temporary-file-directory t))) - ;; Ensure that the command key is the emacs meta key - (when (eq system-type 'darwin) - (setq mac-option-modifier nil - mac-command-modifier 'meta))) + ;; Emacs init config + (use-package emacs + :ensure nil + :hook + (prog-mode . display-line-numbers-mode) + (display-line-numbers-mode . ethandl/line-nums-cfg) + (before-save . ethandl/before-save-hook) + (find-file . ethandl/define-indents) + :init + (ethandl/set-fonts code-font) ;; Set fonts + ;; Get rid of default crud + (setq inhibit-startup-screen t) + (menu-bar-mode 1) + (tool-bar-mode 1) + (when (fboundp 'scroll-bar-mode) + (scroll-bar-mode 0)) + ;; Note, the following two are already set in early_init.el, + ;; so the initial frame has good resizing + (setq frame-resize-pixelwise t) + (setq window-resize-pixelwise t) + ;; Modeline + (line-number-mode 1) ;; Line no. + (column-number-mode 1) ;; Col. no. + ;; Indentation + (setq-default indent-tabs-mode nil) + (setq-default tab-width 4) + (setq-default evil-shift-width tab-width) + (setq ring-bell-function 'ignore) ;; Get rid of the bell + ;; Fuck Control+Scroll to zoom, that's terrible and seems to be bound by something in emacs-plus? + (global-unset-key (kbd "<C-wheel-up>")) + (global-unset-key (kbd "<C-wheel-down>")) + ;; Autosave files need to piss off + (setq backup-directory-alist + `((".*" . ,temporary-file-directory))) + (setq auto-save-file-name-transforms + `((".*" ,temporary-file-directory t))) + ;; Ensure that the command key is the emacs meta key + (when (eq system-type 'darwin) + (setq mac-option-modifier nil + mac-command-modifier 'meta))) #+end_src * Packages ** Ivy and Counsel (Better Text Navigation) @@ -279,7 +282,7 @@ Fix my ineptitude in this keyboard chord hell. #+end_src ** Evil mode Fix my ineptitude in this chord hell that is emacs. I mean seriously, chords just to navigate? I don't want even more RSI & carpel tunnel. -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no ;; Evil mode :D (use-package evil :init @@ -305,13 +308,109 @@ Fix my ineptitude in this chord hell that is emacs. I mean seriously, chords jus (evil-set-initial-state 'dashboard-mode 'normal)) #+end_src *** Evil Collection -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no ;; Extra modes for evil, if evil is playing up this would be the first thing to check (use-package evil-collection :after evil :config (evil-collection-init)) #+end_src +*** Evil is being banished from this realm +I am temporarily trying a new modal style presented by meow, I will make my own modal exiting, merging emacs, vi, kakoune, and helix all into my own abomination 😄. +** Meow +Meow takes some getting used to, but I want to try. +The beauty is that I have full control explicitly over every binding in a really simple interface, and the rest of the binds are just emacs' default with some enhancement: +#+begin_src emacs-lisp + ;; meow :D + (use-package meow + :config + ;; General meow config: + (setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty) + (meow-motion-overwrite-define-key + '("j" . meow-next) + '("k" . meow-prev) + '("<escape>" . ignore)) + (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>" . ignore)) + (meow-global-mode t)) +#+end_src ** Corfu & Cape (Completion) Based completion. This is an overhaul of the autocomplete. Company mode sucks because when you resize a buffer with C-x-+ everything breaks. #+begin_src emacs-lisp diff --git a/early-init.el b/early-init.el @@ -1 +1,3 @@ (setq package-enable-at-startup nil) +(setq frame-resize-pixelwise t) +(setq window-resize-pixelwise t)