.emacs.d

the most bloated Emacs config on this planet
git clone https://git.trogloxene.org/.emacs.d.git
Log | Files | Refs

commit 63e1406383407d7908dda9c764a392b3d6028bc8
parent 7a7df0338246e1405c27170f10e6c92637f6025a
Author: andsy10 <andsy1016@gmail.com>
Date:   Wed, 29 Jul 2026 08:02:17 +0800

Update keybindings and optimize config

Diffstat:
Mlisp/init-kbd-func.el | 12+++---------
Mlisp/init-kbd.el | 16+++++++++-------
Mlisp/init-org.el | 8++++++--
Mlisp/init-prog.el | 1+
Mlisp/init-startup.el | 3+++
5 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/lisp/init-kbd-func.el b/lisp/init-kbd-func.el @@ -214,12 +214,6 @@ otherwise toggle global-jinx-mode." (jinx-mode 1) (org-tree-slide-mode -1))) -(defun my-dired-next-line() - "Move to forward line in dired buffer" - (interactive) - (forward-line 1) - (dired-move-to-filename)) - (defun my-dirvish-layout-toggle () "Toggle layout using first recipe in `dirvish-layout-recipes' instead of fallback." @@ -278,11 +272,11 @@ argument)." (let ((default-directory (project-root (project-current t)))) (opencode))) -(defun my-consult-grep-project () - "Run `consult-grep' in current project's root." +(defun my-consult-git-grep-project () + "Run `consult-git-grep' in current project's root." (interactive) (when-let* ((proj (project-current t))) - (consult-grep (project-root proj)))) + (consult-git-grep (project-root proj)))) (defun consult-colors-emacs (color) "Show a list of all supported colors for a particular frame. diff --git a/lisp/init-kbd.el b/lisp/init-kbd.el @@ -68,6 +68,7 @@ "r" 'consult-recent-file "f" 'consult-find "g" 'consult-grep + "G" 'consult-git-grep "e" 'consult-flycheck "l" 'consult-locate "h" 'consult-fd-home @@ -83,8 +84,8 @@ (general-def :prefix "C-x p" "b" 'consult-project-buffer - "r" 'my-consult-grep-project "t" 'ghostel-project + "r" 'my-consult-git-grep-project "R" 'project-query-replace-regexp "v" 'magit-project-status "V" 'project-vc-dir @@ -176,9 +177,6 @@ "M-." 'scroll-other-window "<mouse-2>" 'emms-play-dired "C-c m a" 'emms-add-dired - "<down>" 'my-dired-next-line - "C-n" 'my-dired-next-line - "n" 'my-dired-next-line "b" 'dired-up-directory "C-b" 'backward-char "C-f" 'forward-char @@ -186,7 +184,8 @@ "<left>" 'dired-up-directory "C-/" 'dired-undo "<SPC>" 'my-dirvish-layout-toggle - "C-c C-r" 'dired-rsync) + "C-c C-r" 'dired-rsync + "e" 'dired-do-eww) (general-def (dired-mode-map dirvish-mode-map) :prefix "C-c d" @@ -310,7 +309,11 @@ ;; eww (general-def eww-mode-map "M-n" 'forward-paragraph - "M-p" 'backward-paragraph) + "M-p" 'backward-paragraph + "p" 'shr-previous-link + "n" 'shr-next-link + "P" 'eww-previous-url + "N" 'eww-next-url) ;; global map with C-c prefix (general-def @@ -386,7 +389,6 @@ "M-`" 'popper-toggle "C-M-=" 'popper-toggle-type-delete-other-window "M-o" 'other-window - "<f10>" 'esw/swap-two-windows ;; other "C-x r b" 'consult-bookmark diff --git a/lisp/init-org.el b/lisp/init-org.el @@ -43,6 +43,12 @@ (or (eq char ?<) (electric-pair-default-inhibit char))))) + ;; show inline images + (setq org-startup-with-inline-images 'inlineimages) + + ;; hide drawer contents + (setq org-startup-folded 'showall) + ;; log in drawer (setq org-log-done t org-log-into-drawer t) @@ -129,8 +135,6 @@ (use-package org-download :after org :demand t - :hook - (org-mode . org-link-preview-region) :config (setq-default org-download-image-dir "./images/" org-download-heading-lvl nil) diff --git a/lisp/init-prog.el b/lisp/init-prog.el @@ -83,6 +83,7 @@ ;; some modes (add-to-list 'auto-mode-alist '("\\.service\\'" . conf-unix-mode)) +(add-to-list 'auto-mode-alist '("\\.timer\\'" . conf-unix-mode)) (provide 'init-prog) ;;; init-prog.el ends here diff --git a/lisp/init-startup.el b/lisp/init-startup.el @@ -95,6 +95,9 @@ ;; secondary browser (setq browse-url-secondary-browser-function 'eww) +;; disabled commands +(put 'narrow-to-region 'disabled nil) + ;; modifier keys on mac (when *is-mac* (setq mac-command-modifier 'meta)