I want to use a 'for' snippet for example. I write for and press tab twice so it autocompletes to the whole for loop and selects the counter so I can change it. I change that and then press tab to go to next variable(the one 'counter < [here]' in the condition statement). Then the problem is i write 'arr' and it autocompletes to something like 'ANGLE_instanced_arrays'. I want to just write 'arr' then press tab to go to next variable in the loop, BUT if I press tab it autocompletes. Any solutions?
Troubleshooting. If you find IntelliSense has stopped working, the language service may not be running. Try restarting VS Code and this should solve the issue. If you are still missing IntelliSense features after installing a language extension, open an issue in the repository of the language extension.
Problems with IntelliSense code snippets are typically caused by two problems: a corrupt snippet file or bad content in the snippet file.
I created an account specifically to answer this question because it's such an annoying problem :)
Add the following to your keybindings.json
:
{"key": "tab", "command": "-acceptSelectedSuggestion", "when": "editorTextFocus && suggestWidgetVisible"},
{"key": "tab", "command": "acceptSelectedSuggestion", "when": "editorTextFocus && suggestWidgetVisible && !inSnippetMode" },
The first line disables the existing rule, the second line re-enables it unless you're in snippet mode.
this is my keybindings.json press tab to go to next variable in the loop ctrl+p go to the previous one
[
{
"key": "tab",
"command": "selectNextSuggestion",
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible" },
{
"key": "ctrl+p",
"command": "selectPrevSuggestion",
"when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible" },
]
What you can do is to disable accepting suggestions on tab
and to enable pure tabCompletion
. The respective settings are "editor.acceptSuggestionOnEnter": false
and "editor.tabCompletion": true
. With those settings you can complete snippets, like for
just with tab (no IntelliSense pop up) and when IntelliSense shows suggestions can be accepted with enter
only
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With