You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a patch that adds the option of automatically expanding the completion when there is only a single candidate. This is particularly nice of ac-auto-start is nil and completion is started from a key binding.
There is a new defun: ac-start-and-expand-single. It functions exactly like ac-start, but if the initial completion list contains only a single candidate, it is automatically expanded and completion ends.
There is also a var: ac-always-expand-single-p. If non-nil, a candidate is automatically selected whenever the candidate list is reduced down to a single item.
I normally have ac-auto-start set to nil. If I bind TAB to ac-start-and-expand-single then hitting TAB will either show a completion menu if there is >1 candidate or immediately do the expansion if there is only a single candidate.
I like this because it works kind of like normal TAB completion: complete if you can, otherwise show me a list to choose from.
This came up because I've been working on using auto-complete to do tab completion in ipython shell mode.
The ac-always-expand-single-p is something I added just to try out when ac-auto-start is 't. It's a bit jarring at times and I'm pretty neutral on this part of the patch. I'd be willing to re-submit the patch without that part if you'd like.
Here is a patch that adds the option of automatically expanding the completion when there is only a single candidate. This is particularly nice of ac-auto-start is nil and completion is started from a key binding.
There is a new defun: ac-start-and-expand-single. It functions exactly like ac-start, but if the initial completion list contains only a single candidate, it is automatically expanded and completion ends.
There is also a var: ac-always-expand-single-p. If non-nil, a candidate is automatically selected whenever the candidate list is reduced down to a single item.
The text was updated successfully, but these errors were encountered: