在Visual Studio中使用代码段

编程入门 行业动态 更新时间:2024-10-25 11:33:28
本文介绍了在Visual Studio中使用代码段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

现在,当我想使用 cw 代码段( Console.WriteLn 的代码段)时。我正在输入 cw , Tab , Tab 。

Right now when I want to use the cw snippet (Code snippet for Console.WriteLn). I am typing cw, Tab, Tab.

这是正确(最快!)的方式吗? 如果有某种方法只需要按一下Tab键或任何其他键,我将很高兴知道它。

Is this the correct (fastest!) way of doing it? If there wouldd be some way of only having to hit the tab key once or any other key I would be glad to know it.

推荐答案

那是最快的方法。请注意,第一个选项卡只是为了摆脱IntelliSense工具提示。第二个选项卡是实际完成工作的选项卡。换句话说,您可以执行 cw + esc / tab / enter + tab 甚至 c + esc + w + 标签。或者甚至可以键入 cw ,转到其他位置,在cw之后单击鼠标右键,然后单击 tab ,它将自动完成。

That is the fastest way. Note that the first tab is just to get rid of the IntelliSense tooltip. The second tab is the one that actually does the work. In other words, you can do cw + esc/tab/enter + tab or even c + esc + w + tab. Or you can even type cw, go somewhere else, click right after the cw then tab and it will auto complete.

如果您执行 var cw tab 。

编辑:使用 cw后,只需键入 c + 标签 + 标签。自上次使用 cw以来,c将从IntelliSense中选择 cw,第一个选项卡将其插入,第二个选项卡将自动完成。

Once you have used "cw", you can then do it a bit faster by just typing c + tab + tab. Since you last used "cw", the c will select "cw" from IntelliSense, the first tab will insert it, and the second tab will auto complete.

更多推荐

在Visual Studio中使用代码段

本文发布于:2023-11-14 13:57:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1587405.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:代码   Visual   Studio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!