From 39172a2d2ca3a6e515a68f3917df9122fa001566 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 1 Mar 2021 14:46:58 -0600 Subject: Config dired and stuff --- init.el | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/init.el b/init.el index feb26ad..b2967aa 100644 --- a/init.el +++ b/init.el @@ -630,3 +630,122 @@ (put 'if 'common-lisp-indent-function 2) (put 'dotimes-protect 'common-lisp-indent-function (get 'when 'common-lisp-indent-function)) + + +;; Dired +(use-package dired + :straight nil + :init + (setq-default dired-recursive-copies 'always + dired-recursive-deletes 'always + delete-by-moving-to-trash t + dired-listing-switches "-AFgho --group-directories-first" + dired-dwim-target t) + :bind ("C-x C-j" . dired-jump)) +(defun hook--dired-mode () + (hl-line-mode +1) + (dired-hide-details-mode +1)) +(add-hook 'dired-mode-hook #'hook--dired-mode) + +(use-package dired-subtree + :bind (:map dired-mode-map + ("i" . dired-subtree-toggle))) + +(use-package dired-collapse + :hook dired-mode) + +(use-package 0x0 + :straight (:repo "https://git.sr.ht/~zge/nullpointer-emacs") + :init (setq 0x0-default-service 'ttm) + :commands (0x0-upload + 0x0-upload-file + 0x0-upload-string + 0x0-upload-kill-ring + 0x0-popup)) + +(use-package elpher + :straight (:repo "git://thelambdalab.xyz/elpher.git") + :commands (elpher elpher-bookmarks) + :init (setq elpher-ipv4-always t + elpher-certificate-directory + (expand-file-name "elpher-certificates/" + acdw/var-dir)) + (add-hook 'elpher-mode-hook #'acdw/reading-mode) + :custom-face + (elpher-gemini-heading1 + ((t (:inherit (modus-theme-heading-1) + :height 1.0)))) + (elpher-gemini-heading2 + ((t (:inherit (modus-theme-heading-2) + :height 1.0)))) + (elpher-gemini-heading3 + ((t (:inherit (modus-theme-heading-3) + :height 1.0)))) + :bind (:map elpher-mode-map + ("n" . elpher-next-link) + ("p" . elpher-prev-link) + ("o" . elpher-follow-current-link) + ("G" . elpher-go-current))) + +(use-package gemini-write + :straight (:repo + "https://alexschroeder.ch/cgit/gemini-write" + :fork (:repo "https://tildegit.org/acdw/gemini-write" + :branch "main")) + :after elpher) + +(use-package gemini-mode + :straight (:repo "https://git.carcosa.net/jmcbray/gemini.el.git") + :mode "\\.\\(gemini\\|gmi\\)\\'" + :custom-face + (gemini-heading-face-1 + ((t (:inherit (elpher-gemini-heading1))))) + (gemini-heading-face2 + ((t (:inherit (elpher-gemini-heading2))))) + (gemini-heading-face3 + ((t (:inherit (elpher-gemini-heading3)))))) + +(use-package nov + :init (setq nov-text-width t) + (add-hook 'nov-mode-hook #'acdw/reading-mode) + :mode ("\\.epub\\'" . nov-mode)) + +(use-package undo-fu + :bind (("C-/" . undo-fu-only-undo) + ("C-?" . undo-fu-only-redo))) +(use-package undo-fu-session + :init (setq undo-fu-session-directory (expand-file-name "undo/" + acdw/var-dir) + undo-fu-session-incompatible-files + '("/COMMIT_EDITMSG\\'" "/git-rebase-todo\\'")) + :config (global-undo-fu-session-mode)) + +(setq-default set-mark-repeat-command-pop t) ; repeat mark pops w/o prefix + +(use-package expand-region + :bind ("C-=" . er/expand-region)) + +(use-package goggles + :hook ((text-mode prog-mode) . goggles-mode)) + +(use-package anzu + :init (setq search-default-mode t) + :bind (([remap query-replace] . anzu-query-replace-regexp) + ([remap query-replace-regexp] . anzu-query-replace) + :map isearch-mode-map + ([remap isearch-query-replace] . anzu-isearch-query-replace) + ([remap isearch-query-replace-regexp] . + anzu-isearch-query-replace-regexp))) + +(use-package iscroll + :hook text-mode) + +(setq-default + browse-url-browser-function 'browse-url-firefox + browse-url-new-window-flag t + browse-url-firefox-new-window-is-tab t + shr-max-width fill-column + shr-width fill-column) + +(when (eq acdw/system :work) + (add-to-list 'exec-path "C:/Program Files/Mozilla Firefox")) -- cgit 1.4.1-21-gabe81