Snippets accept with tab but autocomplete disabled unless press ctrl+space - visual-studio-code

I would like to have autocomplete disabled (unless I press ctrl+space), but also I want to be able to create snippets that populate with tab. How can I have both of these at once?

I'm wondering if I understood you correctly. Here are my opinion, in my understanding.
As for creat snippets, the vscode docs have gien the solution: enter link description here. To simplify, Code -> Prefrences -> User snippets and then New Global Snippets file. Or you can see this question.
Besides, to disable autocomplete, there are several options:
"editor.autoClosingBrackets": false,
"editor.suggestOnTriggerCharacters": false,
"editor.acceptSuggestionOnCommitCharacter": false
...
each has different functions, you can also see the official docs, or I also found another question which may be helpful.
Hope useful.

Related

Weird snippet in VSCode

Does anybody know what this weird snippet is? It doesn't expand into anything.
These block-looking snippets underneath are VSCode's built-in snippets, but this first one is useless and it forces me to press the down arrow every time I want to use any loop. It doesn't have anything to do with my extensions and options and I can't get rid of it.
It is not a snippet, for is a keyword in the language you're coding. So it's just a suggestion for code completion.
In Python def is a keyword to create functions:
Check this page from document to see the explanation of the other icons.
Also if "pressing down arrow" bothers you, you have an option to set the visibility of the snippets on the top of the suggestion list:
"editor.snippetSuggestions": "top",

VS Code - where to find every available settings.json configuration option?

Where I can find good documentation for every available settings.json configuration option so I can configure VS code however I like to?
There isn't an official maintained list of everything, but you can find some guides in the VS Code Documentation.
For theme color reference, you can see the list at Theme Color documentation.
The closest to what you want may be pressing Ctrl+, (or by using the gear menu in the bottom left), you can open a GUI that will show all configurable settings and allow you to search them. For some things, it will tell you to edit it in the settings.json instead, though. In which case, you may need to to look at the documentation for usage instructions.

VSCode: User Snippets showing over path Intellisense

I'm trying to prioritize path intellisense over my user snippets, or just group them with other non-user snippets really. The current behaviour is user snippets -> paths -> other snippets as seen in the screenshot:
I need to navigate paths I don't know the structure but each level I have to scroll down to the suggestion and it's very annoying. I have disabled some snippets, but it's still annoying and it's not worth to turn off custom snippets just because of this.
Some settings I tried are "editor.snippetSuggestions": "inline" and "editor.quickSuggestions": { "strings": false" }. Also tried most popular path autcomplete extensions.
Am I the only one annoyed by this? Is this the default behaviour or did I messed up my config? Thanks in advance.

How do I disable suggestions for plain text documents in VScode?

I sometimes use VScode for plain text documents, however I'm constantly interrupted by suggestions to use particular words:
How can I stop this behavior for txt files? I would still like suggestions for code.
Via this VScode bug and various related bugs I've attempted the following:
"[txt]": {
"editor.quickSuggestions": false
}
However that does not stop the suggestions from happening.
Found the answer to this one myself, via this screenshot on a related bug - pasting it here to help others:
"[plaintext]": {
"editor.wordBasedSuggestions": false,
"editor.quickSuggestions": false
},
this worked for me:
command palette -> Preferences: configure language specific settings
under suggestions, go to Editor: Quick suggestions, and under the other item, change the value from on to off.
Note there were two other confusingly-named settings: Inline suggest: enabled and `Editor: Snippet suggestions". I had no idea what they meant, but they were not relevant here.

How to set up vscode to close window for tags in html?

The window in the picture
enter image description here
If you meant to ask us how to set up Visual Studio Code to automatically add closing tags to XML elements such as the element shown in the picture, afaik I don't think the software features this kind of functionality built in. You might have to go the way of using add-ons, such as these two:
Auto Close Tag for Visual Studio Code
Auto Close Tag by Jun
Han
A web search could easily bring up a couple more. Go ahead and give it a try; if it isn't what you want, please edit your question and make it clear to us.
Okay, after some further research, there is an open issue on getting more control over those hover popups see disable hover in editor.
The suggestion is to use the undocumented setting:
"editor.hover": false,
which works after a restart of vscode. You must restart vscode to get it to work. Unfortunately that applies to all files of any kind and
"[html]": {
"editor.hover": false,
}
does not work so you have to use just
"editor.hover": false,
instead.