从Visual Studio复制粘贴代码,但粘贴未格式化的代码 [英] Copy-paste code from Visual Studio, but paste UNFORMATTED code

查看:221
本文介绍了从Visual Studio复制粘贴代码,但粘贴未格式化的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何方法可以强制Visual Studio将选择的代码作为未格式化文本复制到剪贴板?

Is there any way to force Visual Studio to copy selected code to the clipboard as unformatted text?

当我将代码复制粘贴到Word或更常见的Outlook中时,我必须通过记事本来完成操作以摆脱格式...必须有一种更简单的方法!

When I am copy-pasting code into Word or more often Outlook I have to do it via Notepad to get rid of the formatting...there has to be an easier way!

推荐答案

Visual Studio确实在剪贴板上放置了未格式化的文本,但它也放置了格式化的文本. (剪贴板支持多种同时格式,并且操作系统假定它们只是同一数据的不同表示形式,尽管对此没有任何技术强制要求.)

Visual Studio does put unformatted text on the clipboard, but it also puts formatted text. (The clipboard supports multiple simultaneous formats, and the OS assumes that they're simply different representations of the same data, although there's no technical enforcement of that point.)

您要粘贴的应用程序然后选择其首选格式.在Word和Outlook中,都有一个选择性粘贴"命令,可让您选择要使用的格式.

The application you're using to paste then chooses its preferred format. In Word, and maybe Outlook as well, there is a "Paste Special" command that allows you to choose which format you want to use.

这篇关于从Visual Studio复制粘贴代码,但粘贴未格式化的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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