简体   繁体   English

是否可以使用函数大括号自动完成? C#visual studio

[英]Is it possible to auto complete with function braces? c# visual studio

When I type some letter of a function name in visual studio, it suggests me to auto complete the name of the method by pressing Tab .当我在 Visual Studio 中键入函数名称的某个字母时,它建议我通过按Tab来自动完成方法的名称。 See picture看图

After I press Tab it auto completes the name of the method without braces, I'm sure you all know how it works.在我按下Tab它会自动完成不带括号的方法的名称,我相信你们都知道它是如何工作的。 My question is, is there a way to auto complete the name of the method with braces?我的问题是,有没有办法用大括号自动完成方法的名称? instead of auto completing method_name , make it be method_name()而不是自动完成method_name ,使其成为method_name()

It will help me a lot because most of the time I just need to execute the method.它会对我有很大帮助,因为大多数时候我只需要执行该方法。

I think you cannot get what you want so far.我认为到目前为止你无法得到你想要的。

And VS does not such Intellisense function by default.而 VS 默认没有这样的Intellisense功能。

As a suggestion ,作为建议

1) just as NDJ said, Resharper vs extension has the option that automatically add brackets to methods when auto-completing. 1)正如NDJ所说, Resharper vs extension有自动完成时自动为方法添加括号的选项。

And Resharper is free for 30 days if you are a new user.如果您是新用户,Resharper可免费使用 30 天。

2) Or before you click Enter to complete automatic filling from the Intellisense suggestion window, press the key combination Shift + ( and it will automatically add () with the method. 2)或者在Intellisense建议窗口点击回车完成自动填充之前,按下组合Shift + (它会自动添加()与方法。

在此处输入图片说明

=============================================== ================================================

Besides , if the two suggestions do not meet your requirements, you shouldsuggest your idea to the Team .此外,如果这两个建议不符合您的要求,您应该向团队提出您的想法

在此处输入图片说明

And when you finishing the ticket, you can share the link here and anyone who is interested in it including us will vote it.当你完成了票,您可以在这里分享的链接,谁感兴趣,包括我们任何人都投上一票。

With all of these, I think it will get more attention from Microsoft to help us deal with it more quickly.有了这些,我想微软会更加关注它,帮助我们更快地处理它。

To sum up, @Perry Qian-MSFT said that now its not quite possible to do it, and suggested me to post this idea to the team.综上所述,@Perry Qian-MSFT 表示现在不太可能做到,并建议我将这个想法发布给团队。

Here is a link to it, Make sure you all upvote it if you want this idea to get attention from Microsoft, I will really appreciate it. 这是它的链接,如果你想让这个想法得到微软的关注请确保你们都投票,我将非常感激。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM