Replies: 4 comments 22 replies
-
Well, it's true that generally speaking I dislike requiring a match, and I even have the following in my configuration: (defalias 'vertico-really-exit-input 'exit-minibuffer)
(keymap-set vertico-map "C-<return>" #'vertico-really-exit-input) (Note that I don't override the binding for But that sort of thing doesn't help in your case since consult commands only know how to jump to their candidates, not to some random non-matching string. I'm actually not sure how I would implement this behavior. Maybe @minad will have a suggestion. |
Beta Was this translation helpful? Give feedback.
-
(I moved the discussion from Vertico to the Consult repository, since it fits there much better.) I think we could remember the last matches and show that (maybe on the level of the completion style). But I honestly think it is not a good idea to do this. Other completion commands or Isearch also doesn't find matches if your input does not match. You could try to use a more forgiving completion style (flex or typo). Regarding the "match required" message - the message is there for a reason. It means that the command cannot handle the given minibuffer input. If the completion session would exit the value you would just get an error as a result, which is worse than a "match required" message, where you still have a chance to correct the mistake. For example if you exit M-x with a non-command it will just error. However there are cases, where commands are too restricted. They could in principle handle more minibuffer inputs, but they opt not to do that. In those cases I agree that the "match required" message is harmful and I guess that these are the cases, where Omar prefers plain exit-minibuffer. Ideally the commands would be relaxed to handle more inputs, such that we still get "match required" error checking where necessary, but only there. |
Beta Was this translation helpful? Give feedback.
-
As a simple workaround you can use (defun exit-keeping-point ()
(interactive)
(select-window (minibuffer-selected-window))
(abort-recursive-edit))
(keymap-set vertico-map "C-<return>" #'exit-keeping-point) That's the same idea, but I think the |
Beta Was this translation helpful? Give feedback.
-
Does this mean that I should close this discussion? If it were an issue, I would, but I am not sure what the best practice is for discussions. It seems that my suggestion was rejected as a default behaviour, but I got offered a nice workaround. So maybe this is it on the topic??? |
Beta Was this translation helpful? Give feedback.
-
I would love it if there was a way to validate the last selection, as seen in the buffer, when there is no more valid match in the minibuffer.
Indeed, it happens to me all the time (because I type fast and often make typos) that the place where I would like to go with some consult function or other is selected in the buffer, yet, because of an unfortunate bad last character, the selection is not available in the minibuffer anymore.
This picture shows what I experience countless times every day. In this situation, I wish that pressing
Enter
would take me to that Copilot line that is highlighted in the buffer. That would seem so natural considering that the line already looks like it's been selected. Instead I get thatMatch required
error and have to edit my prompt.I know that I could use flex in orderless, but I don't want to because then I would have everything and anything show up as a match. I really love the behaviour I have in my current settings of vertico, consult, and orderless, except from this situation I keep getting into.
Might it be possible to have vertico take me to that place that I can already see, right there, in the buffer instead of giving me a
Match required
message?@oantolin in #10 seems to suggest that he doesn't think that a match should be required. This is clearly how I feel: as I navigate a buffer with
consult-line
,consult-outline
, etc., my eyes are on the buffer, not on the minibuffer. So by the time I get to the picture above, in my head, I have already gotten the match I wanted and it is always a surprise to get an error instead of just landing where I thought that I already was.Thank you so much and thank you so very much for such wonderful packages! ❤️
Beta Was this translation helpful? Give feedback.
All reactions