]> git.eshelyaron.com Git - dotfiles.git/commitdiff
Bind M-j to minibuffer-force-complete-and-exit during completion
authorEshel Yaron <me@eshelyaron.com>
Fri, 14 Apr 2023 08:35:44 +0000 (11:35 +0300)
committerEshel Yaron <me@eshelyaron.com>
Fri, 14 Apr 2023 08:35:44 +0000 (11:35 +0300)
.emacs.d/init.el

index 5a6a997e243ff147b248b549ef2f9877112c0706..b36316640299238177f17705bbb10cd052596965 100644 (file)
@@ -768,10 +768,18 @@ as the initial input for completion, and return that directory."
           (list string nil action)
         (list string pred action))))
 
-  (define-key minibuffer-local-completion-map
-              [remap previous-line] #'minibuffer-previous-completion)
-  (define-key minibuffer-local-completion-map
-              [remap next-line]     #'minibuffer-next-completion)
+  (keymap-set minibuffer-local-completion-map
+              "<remap> <previous-line>"
+              #'minibuffer-previous-completion)
+
+  (keymap-set minibuffer-local-completion-map
+              "<remap> <next-line>"
+              #'minibuffer-next-completion)
+
+  (keymap-set minibuffer-local-completion-map
+              "<remap> <default-indent-new-line>"
+              #'minibuffer-force-complete-and-exit)
+
 
   (with-eval-after-load 'marginalia
     (add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup))