Visual Studio 代码 - Intellisense 自动完成行为 [英] Visual studio code - Intellisense auto complete behaviour

查看:28
本文介绍了Visual Studio 代码 - Intellisense 自动完成行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 Visual Studio 代码很陌生.我正在使用 Visual Studio 代码进行 AngularJS 应用程序开发.由于我来自 .NET 开发背景,因此我非常喜欢 Visual Studio 代码中的智能感知功能.但我能感觉到这其中缺少了一些东西.当我输入任何对象名称时,自动完成框会弹出建议,当我选择相应的项目并按句点时,对象名称不完整.示例:假设对象名称为 SampleObject.当我开始输入Sam"时,建议弹出列表SampleObject".一旦我选择了这个名字并按下了句点,输出是Sam."而不是SampleObject." 是否需要为预期的行为添加任何设置?非常感谢您的帮助.

I'm pretty new to Visual studio code. I am using Visual studio code for AngularJS application development. As I am from a .NET development background, I'm much fond of intellisense feature in visual studio code. But I could feel something is missing in this. When I type any Object name, autocomplete box pops up with suggestion, when I select the respective item and press period, the object name is not complete. Example: assume the object name is SampleObject. When I start typing "Sam", suggestion pop up lists "SampleObject". Once I select this name and press period, the output is "Sam." and not as "SampleObject." Any setting has to be added for the expected behaviour? Your help is much appreciated.

谢谢.

推荐答案

我在 VScode git hub 问题论坛中发布了相同的查询.我收到了以下回复.

I posted the same query in VScode git hub issues forum. I got the following reply.

您可以将下面的代码片段添加到 VS Code 的键盘快捷键配置中,以接受建议并在按下时插入点.

You can add the snippet below to your keyboard shortcut configuration to the VS Code to accept a suggestion and insert the dot when pressing .

{ "key": ".", "command": "^acceptSelectedSuggestion","when": "editorTextFocus &&suggestWidgetVisible &&suggestionSupportsAcceptOnKey && editorLangId == 'javascript'" }

{ "key": ".", "command": "^acceptSelectedSuggestion", "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey && editorLangId == 'javascript'" }

这奏效了.

这篇关于Visual Studio 代码 - Intellisense 自动完成行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆