VS Code autocompletion base on word in file

余生颓废 提交于 2019-12-30 17:58:05

问题


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


来源:https://stackoverflow.com/questions/31283811/vs-code-autocompletion-base-on-word-in-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!