VS Code autocompletion base on word in file

2020-04-05 02:41发布

问题:

I just begin with VS Code and I'm really happy with it at the moment !

I'm coming from Notepad++ and I didn't found any IDE at the same "level" of it for the things I'm doing.. Until now! I really like what VS Code is doing and how all modern integrated technology is helping me.

But I miss one thing that NPP do is the autocomplete base on word in the file. So can I do the same in VS Code ?

Thanks.

回答1:

Add this to your settings.json, and restart vs code:

// Controls how JavaScript IntelliSense works.

// Always include all words from the current document.
"javascript.suggest.alwaysAllWords": true,

// Complete functions with their parameter signature.
"javascript.suggest.useCodeSnippetsOnMethodSuggest": true


回答2:

"editor.quickSuggestions": {
        "other": true,
        "comments": true,
        "strings": true
      },


回答3:

For autocomplete brackets use this setting:

// Complete functions with their parameter signature.
"javascript.suggest.completeFunctionCalls": true