diff options
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/lisp/init-crux.el | 2 | ||||
-rw-r--r-- | .emacs.d/lisp/init-minibuffer.el | 2 | ||||
-rw-r--r-- | .emacs.d/lisp/init-org.el | 25 |
3 files changed, 27 insertions, 2 deletions
diff --git a/.emacs.d/lisp/init-crux.el b/.emacs.d/lisp/init-crux.el index 9179293..da5ae71 100644 --- a/.emacs.d/lisp/init-crux.el +++ b/.emacs.d/lisp/init-crux.el @@ -30,7 +30,7 @@ ("C-c C-u" . crux-view-url) ("C-c TAB" . crux-indent-rigidly-and-copy-to-clipboard) ("C-c C-M-j" . crux-switch-to-previous-buffer) - ("C-c x" . crux-reopen-as-root)) + ("C-c C-!" . crux-reopen-as-root)) (provide 'init-crux) ;;; init-crux.el ends here diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el index 58d9a70..bb7a1a1 100644 --- a/.emacs.d/lisp/init-minibuffer.el +++ b/.emacs.d/lisp/init-minibuffer.el @@ -147,7 +147,7 @@ DEFS is a plist associating completion categories to commands." ("C-c f" . consult-recent-file) ("C-c r" . consult-ripgrep) ("C-c R" . consult-ripgrep-auto-preview) - ("C-c *" . consult-ripgrep-symbol-at-point) + ("C-c C-*" . consult-ripgrep-symbol-at-point) ("M-y" . consult-yank-pop) ;; orig. yank-pop ("<help> a" . consult-apropos) ;; orig. apropos-command ;; M-g bindings (goto-map) diff --git a/.emacs.d/lisp/init-org.el b/.emacs.d/lisp/init-org.el index a1ae5c4..a5f0e24 100644 --- a/.emacs.d/lisp/init-org.el +++ b/.emacs.d/lisp/init-org.el @@ -5,12 +5,37 @@ (use-package org :ensure nil + :init + ;; TODO - can we do this with sp-wrap-with-pair? + (defmacro define-org-wrap (name char) + (let ((cmd (intern (concat "org-" name)))) + `(defun ,cmd + () + (interactive) + (if (use-region-p) + (let ((re (region-end)) + (rb (region-beginning))) + (goto-char re) + (insert ,char) + (goto-char rb) + (insert ,char)) + (beginning-of-thing 'symbol) + (insert ,char) + (end-of-thing 'symbol) + (insert ,char))) + `(bind-key ,(concat "C-c " (char-to-string char)) ',cmd org-mode-map))) :custom (org-log-done t) (org-special-ctrl-k t) (org-special-ctrl-a t) :config (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) + (define-org-wrap "underline" ?_) + (define-org-wrap "bold" ?*) + (define-org-wrap "italic" ?/) + (define-org-wrap "verbatim" ?=) + (define-org-wrap "code" ?~) + (define-org-wrap "strike-through" ?+) :bind ("C-c l" . org-store-link) ("C-c a" . org-agenda) |