-
-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Intro/Summary:
Hey so if you have a certain vscode setting turned off, and you try to use the use state hook snippet ('ush'), the 'setMyValue' part does not get properly capitalized. Case A and B here show the problem. Case C shows a workaround that will allow it to work. Sorry for the slow gifs. :(
Bug report:
Usually, when typing in a snippet, the autocomplete suggestions will be turned off by default (I assume this is because they can conflict). But I have autocomplete suggestions turned on while typing in a snippet because of convenience and in order to protect myself from spelling mistakes. This is my setting. You'll need to have it set to false like me to reproduce this error:
Cases
Case A (not working) =>
Here I type out 'wordC' and then press the tab key (so that the word autocompletes). Then I press tab again to move the cursor to the useState argument. I then type the value and then keep pressing tab until the snippet is exited.
Result: Not working. The w in word isn't capitalized.
Case B (not working) =>
Here I type out the entire word 'wordCount' and then press the tab key, which will autocomplete the word (it's pointless though because I already typed the entire word out and I'm just doing this to show the error still happens here). Then I press tab again to move the cursor to the useState argument. I then type the value and then keep pressing tab until the snippet is exited.
Result: Not working. The w in word isn't capitalized.
Case C (working) =>
Here I type out the entire word 'wordCount' and then I press the escape key so that the autocomplete suggestions can go away. Then I press tab. And because I pressed the escape key earlier, the cursor will move to the useState argument (instead of autocompleting the word like in the other cases). I then type the value and then keep pressing tab until the snippet is exited.
Result: Working. The w in word is capitalized. It works but the problem is that remembering to press the escape key is annoying. 😢
Metadata
Metadata
Assignees
Labels
Projects
Status


