简体   繁体   English

用于 css 文件的 Visual Studio 2010 注释/取消注释按钮

[英]Visual Studio 2010 comment / uncomment buttons for css files

Are there comment and uncomment buttons that work while you're editing a css file?编辑 css 文件时,是否有可用的注释和取消注释按钮?

/* #content h2 {

    color: #000;
    font-size: 18px;
    margin:5px 0px 5px 0px;
} */

You can record your own macros in VS.您可以在 VS 中录制自己的宏。

This article might help you (it's for VS2008 but it's same in VS2010):本文可能对您有所帮助(它适用于 VS2008,但在 VS2010 中也是如此):

http://www.brianschmitt.com/2009/09/how-to-comment-uncomment-code-selection.html http://www.brianschmitt.com/2009/09/how-to-comment-uncomment-code-selection.html

Unfortunately, no.抱歉不行。

The regular comment keyboard shortcuts, Ctrl+/ or Ctrl+Shift+/ do not work in CSS files.常规注释键盘快捷键Ctrl+/Ctrl+Shift+/在 CSS 文件中不起作用。 I even have Resharper installed and it's "Comment with line comment" and "Comment with block comment" menu items are disabled while inside CSS file.我什至安装了 Resharper,并且在 CSS 文件中禁用了“带有行注释的注释”和“带有块注释的注释”菜单项。

You may be able to set up your own custom macro and assign a keyboard shortcut.您可以设置自己的自定义宏并分配键盘快捷键。 Or there may be a different plugin available which offers this functionality but it is certainly not build into the IDE.或者可能有提供此功能的不同插件可用,但它肯定不会内置到 IDE 中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM