From 664742a1f235379587962279b9fa0dceb7c88728 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Sun, 18 May 2025 13:01:05 +0100 Subject: Moved all binding to use-package bind --- config/editor.el | 31 +++++++++++++++++-------------- config/helm.el | 20 +++++++++++--------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/config/editor.el b/config/editor.el index 4029b6e..e7b65e1 100644 --- a/config/editor.el +++ b/config/editor.el @@ -59,6 +59,14 @@ (use-package smartparens :ensure t + :defer nil + :bind + (:map smartparens-mode-map + ("C-" . sp-forward-slurp-sexp) + ("C-" . sp-forward-barf-sexp) + ("C-M-" . sp-backward-slurp-sexp) + ("C-M-" . sp-backward-barf-sexp)) + :config (require 'smartparens-config) (smartparens-global-mode t) @@ -66,18 +74,13 @@ (setq sp-base-key-bindings 'paredit) (setq sp-autoskip-closing-pair 'always) (setq sp-hybrid-kill-entire-symbol nil) - (setq blink-matching-paren nil) - - (define-key smartparens-mode-map (kbd "C-") 'sp-forward-slurp-sexp) - (define-key smartparens-mode-map (kbd "C-") 'sp-forward-barf-sexp) - (define-key smartparens-mode-map (kbd "C-M-") 'sp-backward-slurp-sexp) - (define-key smartparens-mode-map (kbd "C-M-") 'sp-backward-barf-sexp)) + (setq blink-matching-paren nil)) (use-package easy-kill :ensure t - :config - (global-set-key [remap kill-ring-save] 'easy-kill) - (global-set-key [remap mark-sexp] 'easy-mark)) + :bind + (([remap kill-ring-save] . easy-kill) + ([remap mark-sexp] . easy-mark))) (use-package whitespace-cleanup-mode :ensure t @@ -104,11 +107,11 @@ (use-package crux :ensure t - :config - (global-set-key [remap move-beginning-of-line] #'crux-move-beginning-of-line) - (global-set-key (kbd "C-c o") #'crux-open-with) - (global-set-key (kbd "C-") 'crux-kill-line-backwards) - (global-set-key [remap kill-whole-line] 'crux-kill-whole-line)) + :bind + (([remap move-beginning-of-line] . crux-move-beginning-of-line) + ("C-c o" . crux-open-with) + ("C-" . crux-kill-line-backwards) + ([remap kill-whole-line] . crux-kill-whole-line))) ;; nfkjbndfkb kdjbnkfjb (use-package flyspell diff --git a/config/helm.el b/config/helm.el index b3f87aa..fd4fbe0 100644 --- a/config/helm.el +++ b/config/helm.el @@ -1,16 +1,18 @@ ;; -*- lexical-binding: t; -*- + (use-package helm :ensure t + :bind + (("M-x" . helm-M-x) + ("C-x C-m" . helm-M-x) + ("M-y" . helm-show-kill-ring) + ("C-x b" . helm-mini) + ("C-x C-b" . helm-buffers-list) + ("C-x C-f" . helm-find-files) + ("C-h f" . helm-apropos) + ("C-h r" . helm-info-emacs) + ("C-h C-l" . helm-locate-library)) :config - (global-set-key (kbd "M-x") 'helm-M-x) - (global-set-key (kbd "C-x C-m") 'helm-M-x) - (global-set-key (kbd "M-y") 'helm-show-kill-ring) - (global-set-key (kbd "C-x b") 'helm-mini) - (global-set-key (kbd "C-x C-b") 'helm-buffers-list) - (global-set-key (kbd "C-x C-f") 'helm-find-files) - (global-set-key (kbd "C-h f") 'helm-apropos) - (global-set-key (kbd "C-h r") 'helm-info-emacs) - (global-set-key (kbd "C-h C-l") 'helm-locate-library) (helm-mode 1)) (use-package helm-ag :ensure t) -- cgit v1.2.3