-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Terrible ESC key behaviour with company popup #1372
Comments
I agree that a sane default for auto-completion is to use TAB.
|
I think autocompletion is a very personal thing, and there may be less benefits to having one person's customisations being the spacemacs default. That said, what you want @syl20bnr, can be done by setting:
|
@sooheon ❤️ |
Ok what Ultimately if we can achieve consistency between |
It is pushed in |
Ok you'll find me weird but I put
I find this UX very good because it is symmetric and does not involve the hands to quit the home row. soooo we still have the issue with I think the real issue with |
@mijoharas I removed the variable to use |
Spamming this issue :-) An alternate proposal would be:
So we get rid of |
Trying it now :-) |
Ok forget this, it is awful ! |
What I have is |
just to clarify, my suggestion is |
I also think we should swap |
Definitely there should be an option to disable RET for full completion. Maybe it would use Also note that |
Indeed TAB + RET is the worth :-)
I like the single key to complete common prefix+cycle, feels natural. I propose the remove RET by replacing it with |
We can already use |
I agree with you on the My vote is for I would probably not be too keen on |
I find it slow to move the finger from TAB to CTRL or even SHIFT. |
@tuhdo I dindn't know @syl20bnr Please consider that in linux |
@syl20bnr just to for the sake of discussion. Also, what's wrong with having EDIT: Right now I love that I can And so if I want to expand that snippet I just press and that's it... obviously pressing |
hmmm... still not sure on @CestDiego what you're suggesting is exactly what I had, but after playing around with |
@mijoharas ye I really didn't try the complete-common, but now I see it's value. if we have the tab/shift+tab and C-j/C-k combo that would be so awesome. But also have in mind @syl20bnr that in linux |
Great! :) gonna test it now. I don't feel right about the |
|
Oh I didn't know that...lol if this works then it's ok then :) |
@syl20bnr regarding your reasoning for Edit: I also would like to put in a word for the behaviour of |
I didn't understand the problems with RET. What are them exactly? I didn't That being said I wouldn't be mad if the completions used M-n and M-p for On Thu, Apr 30, 2015 at 1:43 AM, Sooheon Kim notifications@github.com
|
@CestDiego RET in insert mode should give you a new line. Your muscle memory expects it. If you're typing without looking at the cursor, and press RET for a newline but company popup appeared, it would give you a completion when you don't want it. It forces you to pay attention to the state of company popup, and do things like esc and then RET. regarding the completion order, you can set |
Oh ye that happened to me .... well I guess you are right with the C-j and On Thu, Apr 30, 2015 at 1:53 AM, Sooheon Kim notifications@github.com
|
Continuing on the Edit: it occurs to me that @tuhdo's suggestion for |
I have to say that I do not like Why not use These bindings worked for me on linux for both GUI and Termnal emacs: ;; key bindings
(define-key evil-insert-state-map "k" 'spacemacs//company-complete-end)
(let ((map company-active-map))
;; use TAB to auto-complete instead of RET
(define-key map (kbd "j") 'spacemacs//company-complete-start)
(define-key map [return] 'nil)
(define-key map (kbd "RET") 'nil)
(define-key map [tab] 'company-complete)
(define-key map (kbd "TAB") 'company-complete-selection)
(define-key map (kbd "<tab>") 'company-complete-selection)
(define-key map (kbd "C-/") 'company-search-candidates)
(define-key map (kbd "C-M-/") 'company-filter-candidates)
(define-key map (kbd "C-d") 'company-show-doc-buffer)
(define-key map (kbd "C-j") 'company-select-next)
(define-key map (kbd "C-k") 'company-select-previous)
(define-key map (kbd "C-l") 'company-complete-selection)
(define-key map (kbd "<backtab>") 'company-complete-common-or-cycle)
(define-key map (kbd "S-C-i") 'company-complete-common-or-cycle)) As a side note |
@cpaulik |
Also in the last develop I can no longer expand snippets with tab. Is it on purpose that this is only possible with |
If you read above syl20bnr has said that he took out yasnippet. |
Ah sorry I missed that. |
Hmmm... I'm in favour of the |
Just a little question. Does If I remember correctly this is enabled by |
I'm also in favour of the C-j and C-k bindings for the reasons pointed by @mijoharas I actually hope there will be an option to keep Apart from the remaining discussed |
I agree with you. I see no problem with |
We should have default behaviour that is what most people expect. Which is to complete either with |
The discussion goes in circle. :-) I'll keep the current design with RET added for complete-selection. Then I will add back the variable to use only TAB as complete-selection. We have still to fix the issue where sometimes company is not disabled when Le jeudi 30 avril 2015, Christoph Paulik notifications@github.com a
-syl20bnr- |
complete-selection or complete-common? as isn't that the current situation? either way, sensible defaults, with maybe a section in the documentation for auto-completion layer to show people how to customize this to suit themselves as it seems most people want different things here 😄 |
Same as it is in develop right now but with RET added for Plus a variable to use only TAB instead but with complete-selection instead Le jeudi 30 avril 2015, Michael Hauser-Raspe notifications@github.com a
-syl20bnr- |
I like this new design There should definitely be a variable for use of This makes it sound like it should be language specific but that would kill muscle memory. So better to have a global preference (and maybe a toggle) and then keep around some strategies (like my old hack with keywords) that make it so that Also as a dvorak user, +1 for having a variable for the |
I pushed the new design for auto-completion UX. I think it captures well all the stuff we said in this discussion. You can check the documentation here: |
I consider this issue fixed. |
How I can redefine I used this code but failed :(
|
Currently in
develop
since cdd1edd pressing escape while a popup is open will abort the company popup but not exit insert mode. This is terrible user-unfriendly behaviour that kills the ability to use muscle memory. See more discussion in the comments on the commit.The way that #1097 should be fixed is that pressing escape both exits company and exits to normal mode.
The text was updated successfully, but these errors were encountered: