Prevent Visual Studio Code auto-completing incorrectly whilst I type - visual-studio-code

I'm having an issue with VS Code autocomplete (intellisense?) that seems completely illogical, but I can't figure out how to disable it (partly because I've no idea what to actually search for this.)
My most recent example is illustrated in the screenshot below. I am typing out a media query #media (min-width: 768px)
I then follow this up with and to continue the query, yet VS Code has for some reason decided I must want to insert a random unrelated variable here. It doesn't even have the string and anywhere in the variable names suggested.
I am fine with suggestions - they are useful when I want. But the second I hit the space bar, it automatically replaces my text. It is replacing my text despite me doing nothing other than typing what I want to type.
So many times I have been caught out because my correctly typed code is being replaced without any interaction whatsoever on my part. How do I prevent this happening?
Thanks for any help.

Intellisense does not autocomplete on space, and this is not part of its default config either. Therefore this is either a bug (which could be the case), or a misconfiguration caused by an extension or changes to settings.json.
One solution for it would be to disable autocomplete on commit character altogether with "editor.acceptSuggestionOnCommitCharacter": false in settings.json. If "editor.acceptSuggestionOnEnter": "on" is left untouched, autocomplete will then only be triggered on tab/enter.

Related

How do I get imports to show up when I press ctrl+dot in javascript in vscode?

When writing JSX (or any typescript code really) if you have an available import that's not yet imported, you get a squiggly line under it and can press ctrl+dot on it and then automatically import the code as a "refactoring."
How can I set this up in Javascript? I've seen a screenshot of someone else's VSC where it is available underneath "more options" and so I'm pretty sure it's possible, but when I press ctrl+dot I get nothing.
Note: I'm aware I can press ctrl+space. However, I don't want to do this, for two reasons. (1) alt+space is pretty bad UX because if you press it in the middle of a word it continues to autocomplete even if you already had the full name there and so you are left with an incorrect tag (e.g. if your cursor was after the d in Keyboard for a component called KeyboardRow you are left with KeyboardRowRow) and (2) I want to rebind quick fix to alt+enter to match pycharm; and I want the same hotkey & UX in both Typescript and Javascript.
I haven't worked too much with JS, mainly with TS, but I have two extensions installed in my vscode that helped me a lot while coding in vanilla JS.
Path intellisense and Auto import
You can try if My Code Actions can be used to construct a Quick Fix for these types of PROBLEMS/squiggles

VSCode Type Hint toggle display

How can I toggle on and off the display of Type hints in VS Code? For example, I've got the code .remoteOf(ClassServiceClient.class) and what I see is .remoteOf(CLAZZ:ClassServiceClient.class) but I can't actually select or seem to interact with the CLAZZ word.
How do I toggle this on and off? It seems useful in certain situations, but it just makes me think I typoed something.
I'm sure this has been asked before, but I haven't been able to come up with a word that seems to describe this feature.
This feature is called Inlay Hints and can be found under the Editor section.
After this, I've gone from displaying clazz:#Log4J2 to #Log4J2, and have enabled the option to display this hint by holding down a set of keys, ctrl + alt by default on Windows.

Enabling Auto-Complete for custom syntax in Sublime text

I cannot get Sublime auto complete to work properly for custom syntaxes. For example, this is what happens when the syntax is set to Javascript:
When the syntax is set to my custom syntax, these types of suggestions never show up. Custom snippets show up just fine, but variables found in the file do not show up properly. When I click [CTRL+SPACE], this is what I get:
For some reason, single characters will show up, but not whole words. For the syntax, I copied the Completion Rules.tmPreferences, Symbol List.tmPreferences, etc. directly from here so that all should be fine (although messing around with them didn't seem to do anything).
I have tried adding the syntax to auto_complete_selector in settings, but it does not work. I use the package All Autocomplete, and deleting this did not change anything.

Keyboard input blocks in VSCode

Since yesterday, I have a problem when want to edit code in VSCode. Apparently, after changing focus within VSCode, say switching to the menu bar or a to different view and then coming back to the editor view, the cursor changed from the caret to a filled rectangle, and normal keyboard input is blocked. I need to do something like pressing the Escape key which on the first, second, or third try finally puts me into overwrite mode from which I have to switch to insert mode. This is a very annoying situation. Does anyone have a remedy for this?
Apparently, I happened somehow to switch to the vim schema. Once I became aware of this, I simply switched back to the VS schema which I'm used to, and everything works as desired.

VS Code turns everything into an html snippet?

a serious limitation for my workflow with vs code is the fact that while typing html everything gets turned into an html tag when pressing tab at the beginning of a line.
entering:
alsdjflkasjdfk + Tab
leads to:
<alsdjflkasjdfk> </alsdjflkasjdfk>
this is a problem since I want to integrate Django html snipptes and they end up not working. Does someone know how to turn this off? I rather just want defined HTML Snipptes than simply everything turning into one.
Try setting:
"emmet.triggerExpansionOnTab": false
This should disable this feature. We are also investigating a different flow for emmet with VSCode 1.12: https://github.com/Microsoft/vscode/issues/21943