From ff214773f5752bef66e5ac5fd666dafd6b5ac271 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Fri, 1 Mar 2024 23:59:45 -0800 Subject: change readme --- config/emacs.org | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'config/emacs.org') diff --git a/config/emacs.org b/config/emacs.org index ff6342e..ffd2d3a 100644 --- a/config/emacs.org +++ b/config/emacs.org @@ -26,9 +26,9 @@ emacs work in a semi-sane way and make it not look completely ugly: (setq make-backup-files nil) (setq org-export-with-broken-links t) (setq org-src-fontify-natively t) + (setq org-highlight-latex-and-related '(latex script entities)) (setq warning-minimum-level :emergency) (add-hook 'text-mode-hook 'visual-line-mode) - (add-hook 'after-save-hook 'eglot-format) (setq debug-ignored-errors (cons 'remote-file-error debug-ignored-errors)) #+end_src @@ -88,10 +88,16 @@ what electric-pair does based on the mode. Otherwise, just insert the typed character." (interactive) (if (eolp) (let (parens-require-spaces) (insert-pair)) (self-insert-command 1))) + (add-hook 'org-mode-hook (lambda () (define-key org-mode-map "\"" 'electric-pair) - (define-key org-mode-map "\'" 'electric-pair) + (define-key org-mode-map "(" 'electric-pair) + (define-key org-mode-map "[" 'electric-pair) + (define-key org-mode-map "{" 'electric-pair))) + (add-hook 'prog-mode-hook + (lambda () + (define-key org-mode-map "\"" 'electric-pair) (define-key org-mode-map "(" 'electric-pair) (define-key org-mode-map "[" 'electric-pair) (define-key org-mode-map "{" 'electric-pair))) @@ -274,6 +280,7 @@ Ivy is a pretty cool general program for displaying stuff: "m P p" 'org-publish "s e" 'sudo-edit "m m" 'emms + "f f" 'eglot-format "h m" '(woman :wk "Manual") "h r r" '(lambda () (interactive) (org-babel-load-file (expand-file-name "~/org/website/config/emacs.org"))) )) @@ -316,12 +323,15 @@ For all my mathematics and programming notes: #+begin_src emacs-lisp (use-package org-roam :init + (setq org-roam-db-update-on-save t) (setq org-roam-graph-viewer "firefox") (setq org-roam-directory (file-truename "~/org/website/mindmap")) (setq org-roam-capture-templates '(("d" "default" plain "%?" - :target (file+head "${title}.org" - "#+title: ${title}\n#+author: Preston Pan\n#+html_head: \n#+html_head: \n#+html_head: \n#+options: broken-links:t") - :unnarrowed t)))) + :target (file+head "${title}.org" + "#+title: ${title}\n#+author: Preston Pan\n#+html_head: \n#+html_head: \n#+html_head: \n#+options: broken-links:t") + :unnarrowed t))) + :config + (org-roam-db-autosync-mode)) #+end_src ** Pinentry Set up pinentry so that I can use emacs as my pinentry frontend: -- cgit