From c7d831b8e803974d82293c50dfbf7a1787773593 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Fri, 10 Nov 2023 18:32:46 +0200 Subject: emacs:(tools) Update consult & isearch keybindings --- .emacs.d/modules/thanos-tools.el | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to '.emacs.d') diff --git a/.emacs.d/modules/thanos-tools.el b/.emacs.d/modules/thanos-tools.el index 5a29317..51039f7 100644 --- a/.emacs.d/modules/thanos-tools.el +++ b/.emacs.d/modules/thanos-tools.el @@ -72,8 +72,16 @@ (define-key global-map (kbd "C-x r b") 'consult-bookmark) (define-key global-map (kbd "C-c g") 'consult-grep) (define-key global-map (kbd "C-c f") 'consult-find) + +(define-prefix-command 'thanos/search) +(define-key global-map (kbd "C-s") thanos/search) +(define-key thanos/search (kbd "f") 'isearch-forward) +(define-key thanos/search (kbd "b") 'isearch-backward) +(define-key thanos/search (kbd "s") 'consult-line) + (define-key project-prefix-map (kbd "b") 'consult-project-buffer) (define-key global-map (kbd "M-y") 'consult-yank-from-kill-ring) +(define-key global-map (kbd "C-c l") 'consult-locate) (setf xref-show-xrefs-function #'consult-xref @@ -82,19 +90,6 @@ (setf register-preview-delay 0.5 register-preview-function #'consult-register-format) -;; Consult custom lambda functions -(defvar-keymap thanos/consult-search - :doc "Search for files in common folders I regularly use with consult." - "l" #'(lambda () (interactive) (consult-find "~/Library")) - "m" #'(lambda () (interactive) (yeetube-mpv-play - (completing-read "Select video: " - (directory-files-recursively - "/mnt/external/medical-videos/" ".*\.mp4"))))) - -(define-key global-map (kbd "C-c s") #'(lambda ()(message "hello"))) - -(define-key global-map (kbd "C-c s") thanos/consult-search) - (defun insert-brackets (&optional arg) "Insert ARG brackets." (interactive "P") -- cgit v1.2.3