Visual Studio - 如何快速包装HTML标签中的文本? [英] Visual Studio - how to quickly wrap text in HTML tags?

查看:165
本文介绍了Visual Studio - 如何快速包装HTML标签中的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VS 2013中新的HTML编辑器移除了所见即所得模式,并且格式化工具栏被禁用。这通常是好事,但它也进行了简单的编辑,比如使某些文本变粗体或斜体更难。



我现在做一些粗体文本的做法是:


  1. 类型< b>
  2. VS autocompletes < / b>
  3. 我选择结束标签并按下Ctrl + X

  4. 我去到应该是粗体的文本的末尾,然后按Ctrl + V

这比仅仅按下Ctrl + B或类似的东西。我知道在Visual Studio中有Surround with命令,有可定制的键盘快捷键等,所以我希望在Visual Studio中可以以某种方式实现Ctrl + B功能。是否有一些聪明的技巧,或者我可能错过了其他的东西,而不是简单的?

Web Essentials 2013 有一个带有标签的环绕... 功能(Alt + Shift + W),它比内置环绕。无论如何,我可能会坚持使用Web Essentials。


The new HTML editor in VS 2013 removed WYSIWYG mode and the Formatting toolbar is disabled. This is for the good, generally, but it also made simple edits like making some text bold or italics harder.

What I currently do to make some text bold is:

  1. Type <b>
  2. VS autocompletes </b>
  3. I select the end tag and press Ctrl+X
  4. I go to the end of the text that should be bold and press Ctrl+V

This is much less convenient than just pressing Ctrl+B or something similar. I know there is the "Surround with" command in Visual Studio, there are customizable keyboard shortcuts etc. so my hope is that the Ctrl+B functionality can somehow be achieved in Visual Studio. Is there some clever trick or am I possibly missing something other, rather simple?

解决方案

Web Essentials 2013 has a Surround with tag... feature (Alt+Shift+W) that is more fluid than the built-in Surround with. I'm probably just going to stick with it as I am using Web Essentials anyway.

这篇关于Visual Studio - 如何快速包装HTML标签中的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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