X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=emacs_el%2Fconfiguration%2Fdon-configuration.org;h=ac3af192a217f90bb7fb380d424135f0aaeb93b5;hb=72a65433503ca7e2b431b500943ff4478c5c0b11;hp=cae5e62759d57588d867699f7b835749ead53c49;hpb=af86657e831c23ebe748e57515f66af6742c5e63;p=lib.git diff --git a/emacs_el/configuration/don-configuration.org b/emacs_el/configuration/don-configuration.org index cae5e62..ac3af19 100644 --- a/emacs_el/configuration/don-configuration.org +++ b/emacs_el/configuration/don-configuration.org @@ -504,7 +504,7 @@ value, scrolling continues until there is no more output. lsp-ui-doc-delay 2) :hook (lsp-mode . lsp-ui-mode) :bind (:map lsp-ui-mode-map - ("c-c i" . lsp-ui-imenu))) + ("C-c i" . lsp-ui-imenu))) #+END_SRC *** LSP Pyright -- Python language server #+BEGIN_SRC emacs-lisp @@ -539,7 +539,7 @@ value, scrolling continues until there is no more output. :bind ( :map corfu-map - ("M-m" , corfu-move-to-minibuffer) + ("M-m" . corfu-move-to-minibuffer) ) :init (global-corfu-mode) @@ -1038,13 +1038,17 @@ _d_: subtree ** Reftex #+BEGIN_SRC emacs-lisp (use-package reftex + :hook ((LaTeX-mode latex-mode) . reftex-mode) :config (setq-default reftex-default-bibliography - '("~/projects/research/references.bib"))) + '("~/projects/research/references.bib")) + (setq-default reftex-plug-into-AUCTeX t) + ) #+END_SRC ** BibTex #+BEGIN_SRC emacs-lisp (use-package bibtex + :mode "\\.bib\\'" :config (setq bibtex-user-optional-fields (quote (("annote" "Personal annotation (ignored)") ("abstract" "") @@ -1058,21 +1062,11 @@ _d_: subtree (use-package tex :straight auctex :mode ("\\.tex\\'" . LaTeX-mode) - :mode ("\\.bib\\'" . bibtex-mode) :config ; (add-to-list 'TeX-style-path '"/home/don/lib/emacs_el/auctex/style") - ;; REFTEX (much enhanced management of cross-ref, labels, etc) - ;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/ - ; (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t) - ; (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil) - ; (autoload 'reftex-citation "reftex-cite" "Make citation" nil) - ; (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t) - (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode - (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode (add-hook 'LaTeX-mode-hook 'outline-minor-mode) ; with AUCTeX LaTeX mode (add-hook 'latex-mode-hook 'outline-minor-mode) ; with Emacs latex mode - (setq-default reftex-plug-into-AUCTeX t) ;; support fake section headers (setq TeX-outline-extra '(("%chapter" 1) @@ -1209,6 +1203,7 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori #+BEGIN_SRC emacs-lisp (use-package rainbow-mode + :hook ((LaTeX-mode ess-mode python-mode cperl-mode) . rainbow-mode) :delight 🌈 ;; add ess to the x major mode :config (add-to-list 'rainbow-x-colors-major-mode-list 'ESS[S]) @@ -1252,19 +1247,44 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori :straight nil :delight :init - (setq outline-minor-mode-prefix "C-c C-2") + ; (setq outline-minor-mode-prefix nil) + :config + (define-prefix-command 'cm-map nil "Outline-") + (global-set-key "\M-o" cm-map) + ; Outline-minor-mode key map +; HIDE +(define-key cm-map "q" 'outline-hide-sublevels) ; Hide everything but the top-level headings +(define-key cm-map "t" 'outline-hide-body) ; Hide everything but headings (all body lines) +(define-key cm-map "o" 'outline-hide-other) ; Hide other branches +(define-key cm-map "c" 'outline-hide-entry) ; Hide this entry's body +(define-key cm-map "l" 'outline-hide-leaves) ; Hide body lines in this entry and sub-entries +(define-key cm-map "d" 'outline-hide-subtree) ; Hide everything in this entry and sub-entries +; SHOW +(define-key cm-map "a" 'outline-show-all) ; Show (expand) everything +(define-key cm-map "e" 'outline-show-entry) ; Show this heading's body +(define-key cm-map "i" 'outline-show-children) ; Show this heading's immediate child sub-headings +(define-key cm-map "k" 'outline-show-branches) ; Show all sub-headings under this heading +(define-key cm-map "s" 'outline-show-subtree) ; Show (expand) everything in this heading & below +; MOVE +(define-key cm-map "u" 'outline-up-heading) ; Up +(define-key cm-map "n" 'outline-next-visible-heading) ; Next +(define-key cm-map "p" 'outline-previous-visible-heading) ; Previous +(define-key cm-map "f" 'outline-forward-same-level) ; Forward - same level +(define-key cm-map "b" 'outline-backward-same-level) ; Backward - same level + ) #+END_SRC *** outshine (outlining) integration #+BEGIN_SRC emacs-lisp -(use-package outshine - :after outline - :hook (outline-minor-mode . outshine-mode) -) +; (use-package outshine +; :after outline +; :hook (outline-minor-mode . outshine-mode) +; ) #+END_SRC ** Writeroom Mode #+BEGIN_SRC emacs-lisp (use-package writeroom-mode + :commands (writeroom-mode) :config (defun my/writing-mode () "Start my writing mode; enable visual-line-mode and auto-fill-mode" @@ -1470,9 +1490,12 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori ** Beancount #+BEGIN_SRC emacs-lisp (use-package beancount - :straight nil + :straight (beancount + :type git + :host github + :repo "cnsunyour/beancount.el") :load-path "~/lib/emacs_el/beancount-mode/" - :mode "\\.beancount\\'" + :mode "\\.bean\\(?:count\\)?\\'" ) #+END_SRC @@ -1551,26 +1574,20 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori (use-package mutt-mode :mode "muttngrc" :mode "muttrc" + :config + (setq mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases"))) ) #+END_SRC *** Set mail User agent #+BEGIN_SRC emacs-lisp (setq mail-user-agent (quote sendmail-user-agent)) #+END_SRC -*** Mail aliases -#+BEGIN_SRC emacs-lisp -; (use-package -; :straight t -; :hook message -; :config -; (setq mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases"))) -; ) -#+END_SRC * Base emacs ** Reverting buffers #+BEGIN_SRC emacs-lisp (use-package autorevert :delight auto-revert-mode + :demand t :config (setq global-auto-revert-non-file-buffers t global-auto-revert-ignore-modes '(pdf-view-mode) @@ -2716,28 +2733,6 @@ emacs, and use a different desktop file to restore history (put 'downcase-region 'disabled nil) (put 'narrow-to-region 'disabled nil) -; Outline-minor-mode key map -(define-prefix-command 'cm-map nil "Outline-") -; HIDE -(define-key cm-map "q" 'outline-hide-sublevels) ; Hide everything but the top-level headings -(define-key cm-map "t" 'outline-hide-body) ; Hide everything but headings (all body lines) -(define-key cm-map "o" 'outline-hide-other) ; Hide other branches -(define-key cm-map "c" 'outline-hide-entry) ; Hide this entry's body -(define-key cm-map "l" 'outline-hide-leaves) ; Hide body lines in this entry and sub-entries -(define-key cm-map "d" 'outline-hide-subtree) ; Hide everything in this entry and sub-entries -; SHOW -(define-key cm-map "a" 'outline-show-all) ; Show (expand) everything -(define-key cm-map "e" 'outline-show-entry) ; Show this heading's body -(define-key cm-map "i" 'outline-show-children) ; Show this heading's immediate child sub-headings -(define-key cm-map "k" 'outline-show-branches) ; Show all sub-headings under this heading -(define-key cm-map "s" 'outline-show-subtree) ; Show (expand) everything in this heading & below -; MOVE -(define-key cm-map "u" 'outline-up-heading) ; Up -(define-key cm-map "n" 'outline-next-visible-heading) ; Next -(define-key cm-map "p" 'outline-previous-visible-heading) ; Previous -(define-key cm-map "f" 'outline-forward-same-level) ; Forward - same level -(define-key cm-map "b" 'outline-backward-same-level) ; Backward - same level -(global-set-key "\M-o" cm-map) ; fix up tmux xterm keys ; stolen from http://unix.stackexchange.com/questions/24414/shift-arrow-not-working-in-emacs-within-tmux (defun fix-up-tmux-keys ()