From 0d311d36b9d5f430324d919ac097f2364588a432 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 20 Oct 2021 17:31:13 -0500 Subject: blayfduoisaudfoiasdupjfoiu --- init.el | 81 ++++++++++++++++++++++++++++------------------------------------- 1 file changed, 35 insertions(+), 46 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index c2a3579..8886660 100644 --- a/init.el +++ b/init.el @@ -95,6 +95,10 @@ (expand-file-name-exists-p "pkg/" user-emacs-directory))) (normal-top-level-add-subdirs-to-load-path))) +(setup auto-fill + (:hook (defun auto-fill@truncate-lines () + (setq-local truncate-lines t)))) + (setup autoinsert (require 'acdw-autoinsert) (acdw/define-auto-insert '(:replace t) @@ -169,7 +173,8 @@ (cons (rx (or "youtube.com" ; videos "youtu.be" (seq "." (or "mp4" - "gif") + "gif" + "mov" "MOV") eos))) (lambda (&rest args) (apply (if (executable-find "mpv") @@ -390,7 +395,9 @@ native-comp-async-report-warnings-errors nil password-cache t password-cache-expiry (* 60 5) ; seconds - set-mark-command-repeat-pop t) + set-mark-command-repeat-pop t + hscroll-step 1 + scroll-step 1) (when (fboundp 'command-completion-default-include-p) (setq read-extended-command-predicate @@ -414,6 +421,9 @@ "C-c _" #'add-file-local-variable "C-x C-c" #'acdw/fat-finger-exit) + (global-set-key (kbd "M-n") (kbd "C-u 1 C-v")) + (global-set-key (kbd "M-p") (kbd "C-u 1 M-v")) + ;; inspo: https://github.com/zaeph/.emacs.d/blob/master/init.el#L479 (defvar toggle-map (make-sparse-keymap) "A keymap for toggling!") @@ -555,7 +565,9 @@ "C-c l v" #'find-variable)) (setup flymake - + ;; TODO: look at flycheck for ideas around `flycheck-disabled-checkers' and + ;; `flycheck-emacs-lisp-load-path'... there must be a way to get flymake to + ;; recognize new values in the load path. (defvar-local flymake-inhibit nil "Buffer-local variable to inhibit `flymake'.") (add-to-list 'safe-local-variable-values '(flymake-inhibit . t)) @@ -1760,6 +1772,8 @@ See also `crux-reopen-as-root-mode'." (setup (:straight (frowny :host github :repo "duckwork/frowny.el")) + (:option frowny-eyes (rx (| ":" ":-" ":'" "=")) + frowny-eyes-looking-back-limit 2) (global-frowny-mode +1)) (setup (:straight gcmh) @@ -2194,7 +2208,7 @@ browser defined in `browse-url-secondary-browser-function'." (:bind "RET" #'acdw-org/return-dwim "" #'acdw-org/org-table-copy-down - "M-SPC M-SPC" #'insert-zero-width-space + ;; "M-SPC M-SPC" #'insert-zero-width-space "C-c C-l" #'org-insert-link-dwim "C-c w" #'chd/do-the-thing "C-c C-n" #'acdw/org-next-heading-widen @@ -2216,40 +2230,15 @@ browser defined in `browse-url-secondary-browser-function'." #'org-export-remove-zero-width-spaces)) (:local-hook before-save-hook - (defun org/before-save@fix-blank-lines () - (acdw-org/fix-blank-lines t)) - before-save-hook - (defun org/before-save@align-tags () + (defun org/before-save@prettify-buffer () + (run-with-idle-timer 1 nil + (lambda () + (with-temp-message "Filling..." + (save-mark-and-excursion + (mark-whole-buffer) + (org-fill-paragraph nil t))))) + (acdw-org/fix-blank-lines t) (org-align-tags :all))) - - (:hook ;; #'variable-pitch-mode - - ;; (defun org-mode@before-save@fill-buffer () - ;; (add-hook 'before-save-hook - ;; (defun before-save@fill-buffer () - ;; (fill-region (point-min) (point-max))) - ;; nil :local)) - - ;; This is super ugly because I need to add a function to - ;; `before-save-hook', but only in org-mode buffers. So I make a hook - ;; to make a hook. I'm sure there's a better way to do this. - ;; (defun org-mode@fix-blank-lines-on-save () - ;; (add-hook 'before-save-hook - ;; (defun acdw-org/fix-blank-lines-in-buffer () - ;; (acdw-org/fix-blank-lines t)) - ;; 0 :local)) - - ;; (defun org-mode@wc-stupid () - ;; (unless (and wc-mode - ;; (> 0 (+ (or wc-orig-words 0) - ;; (or wc-words-delta 0))))) - ;; (setq-local - ;; wc-count-words-function - ;; (lambda (start end) "Count words stupidly with a limit." - ;; (acdw-org/count-words-stupidly start - ;; end - ;; 999)))) - ) (with-eval-after-load 'org (org-clock-persistence-insinuate)) @@ -2708,16 +2697,16 @@ If used with a numeric prefix argument N, N backticks will be inserted." (setup (:straight wgrep) (wgrep-setup)) -(setup (:straight which-key) - (:option which-key-show-early-on-C-h t - which-key-idle-delay 1 - which-key-idle-secondary-delay 0.5 - which-key-sort-order 'which-key-prefix-then-key-order) +;; (setup (:straight which-key) +;; (:option which-key-show-early-on-C-h t +;; which-key-idle-delay 1 +;; which-key-idle-secondary-delay 0.5 +;; which-key-sort-order 'which-key-prefix-then-key-order) - (:global "C-h m" #'which-key-show-major-mode) - - (which-key-setup-side-window-right-bottom) - (which-key-mode +1)) +;; (:global "C-h m" #'which-key-show-major-mode) + +;; (which-key-setup-side-window-right-bottom) +;; (which-key-mode +1)) (setup (:straight whitespace-cleanup-mode) (global-whitespace-cleanup-mode +1)) -- cgit 1.4.1-21-gabe81