如何在VB.NET中完成Visual Studio片段? [英] How to complete a Visual Studio snippet in VB.NET?

查看:97
本文介绍了如何在VB.NET中完成Visual Studio片段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#中,如果您启动一个代码段,请按 Tab 循环浏览该代码段元素,然后按 Enter 完成并退出该代码段.

In C# if you start a snippet you press Tab to cycle through the snippet elements, and press Enter to complete and exit the snippet.

在VB.NET中,您仍然使用 Tab 循环浏览代码段元素,但是如何结束代码段? 输入不起作用,我无法找出正确的键盘快捷键

In VB.NET you still use Tab to cycle through the snippet elements, but how do you end the snippet? Enter doesn't work and I can't figure out the correct keyboard shortcut

推荐答案

VB代码段与C#代码段的工作方式不同. VB代码段没有结束符,而是保持活动状态,直到您开始在代码段范围之外输入内容为止.最好的方法是按 esc (一次或两次,具体取决于当前选择),然后使用箭头键进行导航.

VB snippets don't work the same way as C# snippets. VB snippets don't have an 'end' and instead stay active until you start typing outside of the snippet scope. The best method is to press esc (once or twice depending on your current selection) and then use the arrow keys to navigate.

MSDN上提供了很棒的演示视频.它主要关注C#,但最后对VB片段进行了一些解释.

A great demo video is available on MSDN. It focusses mostly on C# but has some explanation of the VB snippets at the end.

有关更多信息,请查看键盘绑定海报

For more information check out the keybinding posters

这篇关于如何在VB.NET中完成Visual Studio片段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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