Config: add jinx spell check, org-download, and keybinding updates

This commit is contained in:
User
2026-03-29 21:23:44 +08:00
parent 6131329bdd
commit e7a0e1b382
6 changed files with 86 additions and 11 deletions

View File

@@ -12,6 +12,20 @@
(lambda ()
(require 'org-checklist nil t)))
;; org-download
(use-package org-download
:config
(when *is-mac*
(setq org-download-image-dir "./images")
(unless (file-exists-p "./images")
(make-directory "./images" t))
(setq org-download-link-format "[[file:%s]]\n")
(setq org-download-timestamp "%Y%m%d_%H%M%S_")
(setq org-download-dragndrop t)
(setq org-image-actual-width nil)
(setq org-download-image-html-width 600)
(add-hook 'org-mode-hook 'org-display-inline-images)))
;; org-journal
(use-package org-journal
:config
@@ -97,7 +111,15 @@
(add-hook 'org-mode-hook
(lambda ()
(require 'org-tempo)
(org-indent-mode)))
(org-indent-mode)
(setq-local electric-pair-inhibit-predicate
(lambda (char)
(or (eq char ?<)
(electric-pair-default-inhibit char))))))
(with-eval-after-load 'org
(require 'org-download)
(setq org-return-follows-link t))
;; 预加载防止windows的org-mode加载卡顿
(if *is-windows*
@@ -209,6 +231,11 @@
(org-table-map-tables 'org-table-align t)))
;; hugo
;; 安装ox-hugo
(use-package ox-hugo)
(with-eval-after-load 'org-capture
(defun org-hugo-new-subtree-post-capture-template ()
"Returns `org-capture' template string for new Hugo post.