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

Autocomplete is inserting selection after typing period #47696

Closed
cperryk opened this issue Apr 11, 2018 · 2 comments
Closed

Autocomplete is inserting selection after typing period #47696

cperryk opened this issue Apr 11, 2018 · 2 comments
Assignees
Labels
javascript JavaScript support issues *question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@cperryk
Copy link

cperryk commented Apr 11, 2018

Autocomplete is inserting the selected suggestion after the user types a period. This is not mentioned in the User Guide, which says Pressing Tab or Enter will insert the selected member., and there appears to me to be no clear way to disable this via the keymap. I suspect this is a behavior that some users may expect, but it would be nice if there was some way to disable it, as it makes for a frustrating experience to type out property names that Intellisense is not suggesting.

  • VSCode Version: 1.22.1
  • OS Version: macOS 10.13.1
  • Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Create a Javascript file test.js
  2. Type window
  3. Type .

Because the first suggestion is addEventListener, the result will be window.addEventListener.

@cperryk
Copy link
Author

cperryk commented Apr 11, 2018

Similar issue: #6913

Unfortunately, I don't see any keybinding in the default keybindings that attaches acceptSelectedSuggestion to "." as this previous issue alludes to. Adding the following to my custom key bindings no longer appears to disable this behavior:

{
        "key": ".",
        "command": "-acceptSelectedSuggestion"
}

@mjbvz mjbvz self-assigned this Apr 11, 2018
@vscodebot vscodebot bot removed the new release label Apr 12, 2018
@mjbvz
Copy link
Contributor

mjbvz commented Apr 13, 2018

JavaScript and TypeScript treat . as a commit character that accepts the current suggestion. This helps you write dot accessors more quickly.

To disable this behavior, set:

  "editor.acceptSuggestionOnCommitCharacter": false

@mjbvz mjbvz closed this as completed Apr 13, 2018
@mjbvz mjbvz added *question Issue represents a question, should be posted to StackOverflow (VS Code) javascript JavaScript support issues labels Apr 13, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues *question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants