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

Changing to a new line unfavorably selects the first suggestion #267

Open
munichong opened this issue May 28, 2020 · 3 comments
Open

Changing to a new line unfavorably selects the first suggestion #267

munichong opened this issue May 28, 2020 · 3 comments

Comments

@munichong
Copy link

@munichong munichong commented May 28, 2020

Sometimes I just wanna change to a new line by pressing enter. However, this unfavorably selects the first suggestion in the autocompletion dropdown list.

How should I avoid this?

@drorweiss
Copy link
Collaborator

@drorweiss drorweiss commented May 28, 2020

Many users choose to disable the default behavior of using Enter to accept completions, to avoid accepting a completion when they intended to start a new line. You can do this by going to Settings → Editor: Accept Suggestion On Enter and setting it to off.

@munichong
Copy link
Author

@munichong munichong commented May 28, 2020

Many users choose to disable the default behavior of using Enter to accept completions, to avoid accepting a completion when they intended to start a new line. You can do this by going to Settings → Editor: Accept Suggestion On Enter and setting it to off.

How I can do this in PyCharm?

@Tschigger
Copy link

@Tschigger Tschigger commented Jun 14, 2020

I have exactly the same problem and it makes TabNine borderline unusable. Here is what's happening:

IntelliJ does not offer a way to disable the Enter key for completing suggestions. It's not a problem when you use the native autocomplete, because they don't offer any suggestions when, for example, typing a comma. IntelliJ only offers suggestions when you are actually typing letters, in which case you are aware of the suggestions popping up.

TabNine on the other hand also offers suggestions when typing symbols like ,. So when you want to jump to the end of a line, enter a comma and quickly press Enter to get to the new line, you end up auto-completing whatever was suggested. It's extremely annoying and I am baffled that so few people are commenting on this issue. TabNine needs to offer a config that does not autocomplete after specific keys if IntelliJ does not offer that functionality (they should, too).

I attached a short GIF of me trying to add a parameter to a function by adding a comma and pressing Enter to get to the new line. TabNine blocks it and my Enter ends up autocompleting. I have to press Space, Back and then Enter.

tabnine

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.