VSCode在自动完成功能时添加括号 [英] VSCode add parentheses when automcompleting functions

查看:186
本文介绍了VSCode在自动完成功能时添加括号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以对VSCode进行调整,以便在函数自动完成时以()而不是简单的函数名来编写?

Is is possible to tweak VSCode so that when function gets autocompleted it is written with () instead of just plain function name?

例如,当我键入 str 并自动完成为 strlen 时,我想获得 strlen(),它可以节省很多时间./p>

For example when I type str and autocomplete to strlen I would like to get strlen(), it saves quite some time.

推荐答案

可以通过勾选 javascript.suggest.completeFunctionCalls 属性来解决.运行代码片段以查看gif.

It can be solved by ticking javascript.suggest.completeFunctionCalls property up. Run code snippet to see the gif.

<div style='position:relative; padding-bottom:calc(40.34% + 44px)'><iframe src='https://gfycat.com/ifr/CleverActualHornbill' frameborder='0' scrolling='no' width='100%' height='100%' style='position:absolute;top:0;left:0;' allowfullscreen></iframe></div>

这篇关于VSCode在自动完成功能时添加括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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