Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inserting dash with SPC #25

Closed
rnkn opened this issue Apr 30, 2021 · 5 comments
Closed

Inserting dash with SPC #25

rnkn opened this issue Apr 30, 2021 · 5 comments

Comments

@rnkn
Copy link

rnkn commented Apr 30, 2021

Hello and thank you for creating vertico. Previously I'd tried a few other minibuffer completion modes but nothing ever felt right. You've put an incredible amount of care and attention into vertico so it just feels right. Your work is much appreciated.

Over the years, I've grown very accustomed to inserting "-" (dash) in the minbuffer with the spacebar. This is the default if you're just using regular Emacs completing-read with no minibuffer completion modes.

I'd like to submit a PR that adds an option to retain this behaviour if that's something you're interested in? If so, would you like this as just a defcustom? To achieve this I'd just make SPC call a command vertico-self-insert-space that either calls (insert ?-) or self-insert-command depending on the value of the option.

@rnkn
Copy link
Author

rnkn commented Apr 30, 2021

p.s. I meant to say, I discovered your mode via https://www.manueluberti.eu//emacs/2021/04/12/vertico/

@minad
Copy link
Owner

minad commented Apr 30, 2021

Thanks for the kind words.

I'd like to submit a PR that adds an option to retain this behaviour if that's something you're interested in?

I want to keep the current behavior and don't want to offer an alternative. It is easy enough to achieve the desired behavior with some small adjustments to the user configuration. You can write your own command and bind it to vertico-map. Alternatively, a small configuration adjustment seems to do it:

(define-key vertico-map " " #'minibuffer-complete-word)
(setq completion-styles '(basic))

Note that vertico is compatible with default completion. You can use all the normal minibuffer-complete-*, minibuffer-force-complete-* commands. I hope this helps!

@minad minad closed this as completed Apr 30, 2021
@minad
Copy link
Owner

minad commented Apr 30, 2021

p.s. I meant to say, I discovered your mode via https://www.manueluberti.eu//emacs/2021/04/12/vertico/

@manuel-uberti will be happy to hear this! :)

@manuel-uberti
Copy link
Contributor

Oh yes, I am always happy when I write something useful to others. Thank you @rnkn!

@rnkn
Copy link
Author

rnkn commented Apr 30, 2021

Alternatively, a small configuration adjustment seems to do it: ...

This is much cleaner/easier than what I had. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants