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

Bind SPC to minibuffer-complete-word #138

Conversation

kaushalmodi
Copy link
Contributor

  • This binding will make the executions of commands like
    counsel-describe-variable, counsel-describe-function,
    counsel-M-x, etc magical!

  • You will be able to use SPC to autocomplete the
    variable/function/command intelligently (just as it does in the
    emacs inbuilt execute-extended-command.

    Example: list-c SPC will autocomplete that to list-colors-display when
    executing counsel-M-x

- This binding will make the executions of commands like
  `counsel-describe-variable`, `counsel-describe-function`,
  `counsel-M-x`, etc magical!
- You will be able to use SPC to autocomplete the
  variable/function/command intelligently (just as it does in the
  emacs inbuilt `execute-extended-command`.

  Example: list-c SPC will autocomplete that to list-colors-display when
  executing `counsel-M-x`
@abo-abo abo-abo closed this in e016d48 Jun 12, 2015
@abo-abo
Copy link
Owner

abo-abo commented Jun 12, 2015

Sorry, but I don't like this change. SPC should insert a space. This is part of the experience that I want Ivy to have: it should behave like a normal buffer if possible. So SPC should insert a space, like in a normal buffer; and C-w should call kill-region, like a normal buffer etc.

We can bind minibuffer-complete-word to C-z w if you wish. I think C-z could become a prefix for a lot of commands.

As for list-c SPC, you can get a similar behavior with ^list-c TAB. One problem with minibuffer-complete-word is that it automatically assumes that ^ is there. Feels not consistent.

Another idea is to make counsel-M-x auto-insert the initial ^. You could delete it if you want with DEL.

abo-abo added a commit that referenced this pull request Jun 12, 2015
* counsel.el (counsel-M-x): Use `counsel-M-x-initial-input'.

Re #138
@kaushalmodi
Copy link
Contributor Author

I agree with your vision for the use of SPC key. I have bound that way in my init and it works fine because I use the fuzzy search regexp function.

It's alright that the counsel-M-x behavior stays the way it is (without autoinserting ^) because that will feel more than a patchwork and move away from the consistency with other functions like counsel-describe-function, etc

@abo-abo
Copy link
Owner

abo-abo commented Jun 12, 2015

It's alright that the counsel-M-x behavior stays the way it is (without autoinserting ^)

Actually, as I'm using it today, it works great. Auto-adding ^ brings back the feeling of old school non-ido completion. For me, 95% of the time, it doesn't matter that input starts with ^, but I get less candidates as a bonus, and usually there's no need to use arrows. And if I need more candidates, it's a simple C-a C-d to remove ^.

You should try it for a while. I was skeptical initially as well.

@kaushalmodi kaushalmodi deleted the magical-space-in-counsel-describe-map branch June 10, 2016 14:35
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

Successfully merging this pull request may close these issues.

2 participants