VS2010 adds additional white lines between pasted code
When I copy-paste code from Websites (for example: http://www.west-wind.com/Weblog/posts/154812.aspx) Visual Studio 2010 adds a new empty line after e开发者_Python百科very line of code.
How can I prevent this from happening?
You should ask the author of that web page to fix it. It is not problem of Visual Studio. Each line of source code on that page is formatted as a new separate paragraph, empty lines are automatically inserted between paragraphs on copying. It is indeed a stupid idea to have each line in its own paragraph, and in addition it uses inline styling with atyle attribute instead of css classes. (This is needed to get rid of those empty lines in web browser.)
I tried Internet Explorer and Firefox and they both put the text with empty lines to clipboard, so you have no chance to get it easily copied without empty lines regardless of which target editor you use. You need to do some tricks. Or ask the author of that page...
精彩评论