禁用“自动 ID 元素"在 Visual Studio 2013 中 [英] Disable "Auto ID elements" in Visual Studio 2013

查看:18
本文介绍了禁用“自动 ID 元素"在 Visual Studio 2013 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在工具 > 选项中,我找不到禁用自动重命名粘贴在 HTML 源代码视图中的元素的设置.

In Tools > Options, I cannot find the setting to disable auto-renaming of elements which are pasted in HTML source view.

它曾经是:工具 > 选项 > 文本编辑器 > HTML > 杂项> 在源视图中粘贴时自动识别元素.但该选项在 Visual Studio 2013 中消失了.

It used to be: Tools > Options > Text Editor > HTML > Miscellaneous > Auto ID elements on paste in Source view. But that option is gone in Visual Studio 2013.

如何禁用自动重命名?

推荐答案

目前最好的解决方案似乎是用户在 Microsoft Connect 网站 将代码粘贴为注释.

For now the best solution seems to be a workaround that was posted by a user on the Microsoft Connect website which is to paste the code as a comment.

愚弄 IDE 我们没有粘贴代码(因此他不会更改它).如何 ?粘贴评论!在现实生活中如何做到这一点?这是我的做法(请随时提出其他建议!):

Fool the IDE that we're not pasting code (thus he won't alter it). How ? Paste a comment ! How to do that in real life ? Here is how I do it (feel free to suggest other ways!):

1) 将光标放在我想粘贴代码的地方2) ctrl-k, ctrl-c (即评论区.由于未选择任何区域,因此空注释是插入和我们的光标在它里面)3)ctrl-v(粘贴内容是相信是 IDE 的评论)4)ctrl-k,ctrl-u(即取消评论我们当前的评论!

1) Place cursor where I want to paste code 2) ctrl-k, ctrl-c (i.e. comment region. Since no region was selected, an empty comment is inserted and our cursor Inside of it) 3) ctrl-v (paste content that is believed to be a comment by the IDE) 4) ctrl-k, ctrl-u (i.e. un-commenting the current comment we're in!

这篇关于禁用“自动 ID 元素"在 Visual Studio 2013 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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