diff options
author | Thanos Apollo <[email protected]> | 2023-11-10 18:32:46 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-11-10 18:32:46 +0200 |
commit | c7d831b8e803974d82293c50dfbf7a1787773593 (patch) | |
tree | 01adc3a2facddf96e2587db9325da5fffc73738d /.emacs.d/modules/thanos-tools.el | |
parent | 8dab21071fa28aeb1f3668c7364e4c18325541d7 (diff) |
emacs:(tools) Update consult & isearch keybindings
Diffstat (limited to '.emacs.d/modules/thanos-tools.el')
-rw-r--r-- | .emacs.d/modules/thanos-tools.el | 21 |
1 files changed, 8 insertions, 13 deletions
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") |