问题描述
在工具>选项中,找不到用于禁用在HTML源代码视图中粘贴的元素的自动重命名设置。
In Tools > Options, I cannot find the setting to disable auto-renaming of elements which are pasted in HTML source view.
:工具>选项>文本编辑器> HTML>其他>自动ID元素粘贴在源视图中。
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.
如何禁用自动重命名?
推荐答案
现在最好的解决方案似乎是一个解决方法,由用户发布在将代码粘贴为注释。
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.
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!
这篇关于禁用“Auto ID元素”在Visual Studio 2013中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!