diff options
Diffstat (limited to 'emacs/inits/11-completion.el')
| -rw-r--r-- | emacs/inits/11-completion.el | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/emacs/inits/11-completion.el b/emacs/inits/11-completion.el index 0206324..06296cf 100644 --- a/emacs/inits/11-completion.el +++ b/emacs/inits/11-completion.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2021-06-29 17h26 EDT (hobbies)> +;; Time-stamp: <2021-07-02 17h40 EDT (hobbies)> ;; ----------------------------------------------------------------------------- ;; Vertico @@ -64,7 +64,8 @@ ;; M-g bindings (goto-map) ("M-g e" . consult-compile-error) ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck - ("M-g g" . consult-line) ;; orig. goto-line + ("C-s" . consult-line) ;; orig. goto-line + ("C-r" . isearch-forward-regexp) ("M-g M-g" . consult-goto-line) ;; orig. goto-line ("M-g o" . consult-outline) ;; Alternative: consult-org-heading ("M-g m" . consult-mark) @@ -73,7 +74,7 @@ ("M-g I" . consult-project-imenu) ;; M-s bindings (search-map) ("M-s f" . consult-find) - ("M-s L" . consult-locate) + ("M-s L" . consult-locate) ("C-c g" . consult-ripgrep) ("C-c G" . consult-git-grep) ("M-s l" . consult-line) @@ -112,6 +113,21 @@ consult--source-file consult--source-project-file consult--source-bookmark :preview-key (kbd "M-.")) + (defun previous-history-or-next () + (interactive) + (if (string= "" (minibuffer-contents-no-properties)) + (progn + (previous-history-element 1) + (end-of-line)) + (vertico-next))) + + (defvar my-consult-line-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-s" #'previous-history-or-next) + map)) + + (consult-customize consult-line :keymap my-consult-line-map) + ;; Optionally configure the narrowing key. ;; Both < and C-+ work reasonably well. (setq consult-narrow-key "<") ;; (kbd "C-+") |
