From 5136c9bb80912cd6e02b772d95b3f0f3e947fa60 Mon Sep 17 00:00:00 2001 From: larstvei Date: Sat, 24 Jun 2023 11:21:31 +0200 Subject: [PATCH] Organize keybindings with use-package --- init.org | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/init.org b/init.org index fcecaac..f309104 100644 --- a/init.org +++ b/init.org @@ -1962,13 +1962,15 @@ #+begin_src emacs-lisp - (define-key custom-bindings-map (kbd "M-u") 'upcase-dwim) - (define-key custom-bindings-map (kbd "M-c") 'capitalize-dwim) - (define-key custom-bindings-map (kbd "M-l") 'downcase-dwim) - (define-key custom-bindings-map (kbd "M-]") 'other-frame) - (define-key custom-bindings-map (kbd "C-j") 'newline-and-indent) - (define-key custom-bindings-map (kbd "C-c s") 'ispell-word) - (define-key custom-bindings-map (kbd "C-c v") 'visible-mode) + (use-package emacs + :bind (:map custom-bindings-map + ("M-u" . upcase-dwim) + ("M-c" . capitalize-dwim) + ("M-l" . downcase-dwim) + ("M-]" . other-frame) + ("C-j" . newline-and-indent) + ("C-c s" . ispell-word) + ("C-c v" . visible-mode))) #+end_src @@ -1976,22 +1978,22 @@ #+begin_src emacs-lisp - (define-key global-map (kbd "M-p") 'jump-to-previous-like-this) - (define-key global-map (kbd "M-n") 'jump-to-next-like-this) - (define-key custom-bindings-map (kbd "M-,") 'jump-to-previous-like-this) - (define-key custom-bindings-map (kbd "M-.") 'jump-to-next-like-this) - (define-key custom-bindings-map (kbd "C-c .") (cycle-themes)) - (define-key custom-bindings-map (kbd "C-x k") 'kill-this-buffer-unless-scratch) - (define-key custom-bindings-map (kbd "C-c C-0") 'global-scale-default) - (define-key custom-bindings-map (kbd "C-c C-=") 'global-scale-up) - (define-key custom-bindings-map (kbd "C-c C-+") 'global-scale-up) - (define-key custom-bindings-map (kbd "C-c C--") 'global-scale-down) - (define-key custom-bindings-map (kbd "C-c j") 'cycle-spacing-delete-newlines) - (define-key custom-bindings-map (kbd "C-c d") 'duplicate-thing) - (define-key custom-bindings-map (kbd "") 'tidy) - - (with-eval-after-load 'org - (define-key org-mode-map (kbd "C-'") 'org-sync-pdf)) + (use-package emacs + :bind (("M-p" . jump-to-previous-like-this) + ("M-n" . jump-to-next-like-this) + :map custom-bindings-map + ("M-," . jump-to-previous-like-this) + ("M-." . jump-to-next-like-this) + ("C-x k" . kill-this-buffer-unless-scratch) + ("C-c C-0" . global-scale-default) + ("C-c C-=" . global-scale-up) + ("C-c C-+" . global-scale-up) + ("C-c C--" . global-scale-down) + ("C-c j" . cycle-spacing-delete-newlines) + ("C-c d" . duplicate-thing) + ("" . tidy)) + :config + (define-key custom-bindings-map (kbd "C-c .") (cycle-themes))) #+end_src