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

Auto-completion with Tab and Enter #4878

Closed
ghost opened this issue Apr 2, 2016 · 14 comments
Closed

Auto-completion with Tab and Enter #4878

ghost opened this issue Apr 2, 2016 · 14 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities suggest IntelliSense, Auto Complete
Milestone

Comments

@ghost
Copy link

ghost commented Apr 2, 2016

  • VSCode Version: 0.10.11
  • OS Version: Fedora 23, 64bit

It would be great if there's an option for (auto-completion):

  • Pressing Tab will replace the rest.
  • Pressing Enter will insert into current caret position.

Or vice-versa.

Thanks,

@jrieken
Copy link
Member

jrieken commented Apr 4, 2016

not sure if I understand that. @haibison can you clarify what the different between replace the rest and insert into current care pos means?

@jrieken jrieken added the info-needed Issue requires more information from poster label Apr 4, 2016
@ghost
Copy link
Author

ghost commented Apr 4, 2016

Hi @jrieken,

Thanks. I mean, for example here's the content I'm typing (the pipe is the caret):

someFunc|Abc

And the auto-completion list offers someFunction. Then:

  • If I press Tab, it replaces Abc with tion, so it would become someFunction.
  • If I press Enter, it inserts tion into the caret position, so it would become someFunctionAbc.

If there's a white space after the caret, then either Tab or Enter will just insert the offered text into current caret position (which is current behavior).

@jrieken jrieken removed the info-needed Issue requires more information from poster label Apr 4, 2016
@jrieken
Copy link
Member

jrieken commented Apr 4, 2016

Understood, thanks for clarifying

@jrieken jrieken assigned joaomoreno and unassigned jrieken Apr 4, 2016
@joaomoreno joaomoreno added this to the April 2016 milestone Apr 4, 2016
@joaomoreno joaomoreno modified the milestones: Backlog, April 2016 Apr 27, 2016
@joaomoreno joaomoreno added intellisense bug Issue identified by VS Code Team member as probable bug feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels Jul 6, 2016
@joaomoreno
Copy link
Member

We could provide two different commands here and use the keybindings as a way for the user to customise the behaviour.

@joaomoreno joaomoreno added the help wanted Issues identified as good community contribution opportunities label Jul 6, 2016
@jrieken
Copy link
Member

jrieken commented Jul 6, 2016

Yeah - tho we need to think what is means wrt text edits completion providers describe. Technically they can already do this (just select the corresponding range)...

@joaomoreno joaomoreno added suggest IntelliSense, Auto Complete and removed intellisense labels Sep 27, 2016
@joaomoreno
Copy link
Member

@jrieken How are we on this?

@probert94
Copy link

Eclipse has a setting for this, where you can choose to replace or insert. If you choose to insert, you stil can hit ctrl + enter to replace.
Android Studio (or IntelliJ in general?) has the same feature, where tab replaces and enter inserts as much as I remember.
It would be nice, if we could have it in vscode too :)

@Lamester
Copy link

We need this feature. It's very annoying, especially when Visual Studio 2017 allows this behavior and VS Code does not.

@jrieken
Copy link
Member

jrieken commented Oct 3, 2018

actually related (maybe same) to #10266

@silverqx
Copy link

silverqx commented Apr 3, 2019

Yeah, replace on tab and insert on enter, i'm lacking this feature too

@jrieken
Copy link
Member

jrieken commented Oct 10, 2019

/duplicate of #10266

@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 10, 2019
@jrieken jrieken self-assigned this Oct 10, 2019
@vscodebot
Copy link

vscodebot bot commented Oct 10, 2019

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Oct 10, 2019
@cjbarth
Copy link

cjbarth commented Oct 10, 2019

Why is it that the older issue is the one marked as duplicate? I would expect that newer issues duplicating existing issues would be the ones marked as duplicates.

@geekley
Copy link

geekley commented Jul 17, 2020

@jrieken Is this really a duplicate? Has this been implemented? I would expect "editor.suggest.insertMode" to have a third option like replaceWhenTab to allow both behaviors, like in Android Studio. So that I can choose to insert with ENTER or replace with TAB.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities suggest IntelliSense, Auto Complete
Projects
None yet
Development

No branches or pull requests

7 participants