简体   繁体   中英

How to Paste as Comment in VS2010?

This is a micro optimization that I'd have in my ideal IDE - the ability to paste from the clipboard directly into the editor as a comment. The idea is sometimes I feel like I lose entire seconds to moving my hand over to the mouse, selecting what I just pasted, having involentary stress over trying to beat the red-squiggly's from appearing, and finally pressing control-K,C.

Not exactly what you're looking for, but if you paste with Ctrl + Shift + V (Cycle through the Clipboard Ring), the pasted text is already highlighted and selected for you. You can then follow that up with a Ctrl + K , C to comment it out.

Type /* , Ctrl + V , type */ . Your hands never need to leave the keyboard.

试试SmartPaster ,这是一个视觉工作室2005年,2008年和2010年的插件,它将粘贴作为注释,字符串,字符串构建器和区域添加到右键菜单中。

You might be able to record a macro to do this. In Vs you can use the record macro functionality, you can create your own button in the menu to activate the macro.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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