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

[code assist] let the user choose whether to overwrite the following word or only insert. #30107

Closed
ghost opened this issue Jul 4, 2017 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) editor-bracket-matching Editor brace matching

Comments

@ghost
Copy link

ghost commented Jul 4, 2017

  • VSCode Version: 1.13.1
  • OS Version: Win 10 Pro

Steps to Reproduce:

  1. When I start typing a tag right before text that already exists, it will bring up the suggestions and when I select the tag that I want (whether by pressing "Enter", "Tab", or by selecting it with the cursor), then the word next to it is overwritten by the tag.

It does this with any suggested tag as far as I can tell.

I have attached 3 pictures where I am trying to add the emphasis tag to the word "website". The first picture is before I have started to tag, the 2nd is as I start to type the tag (you will notice that the word "website" is being highlighted in blue), and then after I have selected the emphasis tag from the suggestions you can see the word "website" is gone and replaced with just the tag.

capture

capture1

capture2

Reproduces without extensions: Yes (I think, I am new to vsc and programming in general, so I think that I hadn't added any extensions to begin with. Someone else suggested the extension htmltagwrap, but that was the first extension I installed and it was doing it before. With that wrapper installed, I would highlight the text I wanted to tag and when I typed "<" it would add angled brackets to the beginning and end, but as soon as I typed anything else then it would overwrite the highlighted portion.

@hexrcs
Copy link

hexrcs commented Jul 7, 2017

This happens in macOS Sierra as well.

@jrieken jrieken assigned aeschli and unassigned jrieken Jul 10, 2017
@jrieken
Copy link
Member

jrieken commented Jul 10, 2017

The extension can decide what it wants to replace/overwrite. By default the current word is being used, tho there is a desire to stream line that for all extensions

@aeschli
Copy link
Contributor

aeschli commented Jul 11, 2017

What you see is the currently expected behavior in HTML. It's a duplicate of #19560.

In Eclipse the user can choose with a modifier key whether code assist should replace the following word, or just insert the proposal.
Alternatively, this could be done on a language basis, with a setting, but I think it would be better to do this consistently across languages, without a new setting.

@aeschli aeschli assigned jrieken and unassigned aeschli Jul 11, 2017
@aeschli aeschli changed the title When selecting an intellisense suggestion it will overwrite nearby text [code assist] let the user choose whether to overwrite the following word or only insert. Jul 11, 2017
@jrieken jrieken added the *duplicate Issue identified as a duplicate of another issue(s) label Jul 11, 2017
@jrieken jrieken closed this as completed Jul 11, 2017
@jrieken
Copy link
Member

jrieken commented Jul 11, 2017

#10266

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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) editor-bracket-matching Editor brace matching
Projects
None yet
Development

No branches or pull requests

3 participants