Can I paste plain text by default?
Solution 1
Unfortunately, no. And I believe this is by design.
The issue is that the Windows clipboard does not have to store the data. It is effectively a clearing house where any application can list the data that was just copied (or cut) and offer it up to any application (including itself) to be pasted. The clipboard contains a list of formats in which the data is available, and if the application chooses to do so, the data itself in some of those formats.
The application that processes a Paste operation then has the option to choose the data format that best suits it. Some applications (e.g. Notepad) will only accept one particular format (such as plain text) and simply do nothing if that format is not available. Others pick a preferred format by default but provide a UI for choosing among alternatives that can be understood by that application.
In principle a program could be written that monitors the clipboard for new content and flattens any non-text content to just plain text. There is an event available to notify such a monitor of new content on the clipboard. However, I suspect that implementing such a thing would break a fair number of programs, and possibly in surprising ways.
The simple workaround in stock XP is to use Notepad to flatten the data when needed, or to use one of the many tools that improve the clipboard by implementing a stack, providing a view of its content, and so forth.
If you want to try building a tool yourself, might benefit from this question over at SO, and its related questions....
Solution 2
This is a pretty decent compromise: PureText.
This may not be a direct answer to what you asked, but this may be of use to someone else with a more general version of your question.
Solution 3
There is not way to do this by default, but with a bit of hackery, we can work around that.
You will need:
- PlainTextClipboard
- AutoIT Script (you can use AutoHotKey, I just don't know that scripting language)
Create an AutoIt Script with the following code:
$ptcPath = "C:\Program Files (x86)\Plain Text Clipboard\PlainTextClipboard.exe"
HotKeySet("^v", "PastePlainText")
While True ;Keep it running indefinitely.
WEnd
HotKeySet("^v") ;unregister the hotkey
Func PastePlainText()
Run($ptcPath);
Send(ClipGet())
EndFunc
When you press Ctrl + V, this will run the PlainTextClipboard program, then send the contents of your clipboard to the current window. Unfortunately, it will send the contents one character at a time, so it is a bit slow. It's a problem I'm working on, but it should serve as a reasonable start. If there are any AutoHotKey/AutoIT gurus out there, feel free to make your own version of this script. I'll update it as soon as I figure out how to solve the problem.
Solution 4
I keep running into this too. Other than using/writing a program to strip the extra formatting, the simplest way I've found to strip formatting is by pasting the text into the "Run" windows (reachable by WIN + R) and re-copying it from there.
So I end up doing this, really quickly: CTRL+C, WIN + R, CTRL+V, SHIFT+HOME, CTRL+C, ALT+TAB, CTRL+V - I can't help but wonder now if I've been doing this for too long...
Only works for single-line text, though.
Solution 5
I can't provide you with a simple solution, but like the others, I will provide you with a workaround:
A shortcut to your first option is to use Ctrl + Alt + v to pop up the Paste Special dialog without using the mouse. Typing u to jump to Unformatted Unicode Text entry (or u u to get to the non-Unicode version) and then Enter will do it for you. Not perfect, but built in.
Related videos on Youtube
Nathan Long
I code mostly in Ruby and Elixir. More about me at nathanmlong.com and Stackoverflow Careers.
Updated on September 17, 2022Comments
-
Nathan Long almost 2 years
I regularly copy and paste text between spreadsheets, emails, browser windows, etc. I can't think of a single time when I've wanted to keep the formatting from the source text.
I already know about the following workarounds:
- Use “Edit” → “Paste Special” → “Unformatted text”
- Paste to Notepad and copy from there
- Install a program that takes over the clipboard
What I want is to tell Windows to just do this by default.
Is this possible?
-
Assaf Levy almost 15 years+1, this annoys me too when using Outlook at work
-
MT. almost 15 yearsForgive me, but i thought that WAS the default for xp...
-
lprsd almost 15 yearsHave a "Copy" and "Copy Special"; and but only "Paste" seems to be the solution. Steven Sinofsky, listening?
-
noseratio almost 3 yearsCtrl+V to paste unformatted text by default for all programs: github.com/postprintum/devcomrade#what-is-it
-
Nathan Long almost 15 yearsThanks for the suggestion. Meanwhile, I'm still looking for a way to change the default setting. Anyone know how?
-
Christopher_G_Lewis almost 15 yearsI've run this app for years. It rocks.
-
Nathan Long almost 15 yearsThanks - this appears to be the most direct and complete answer to my question. I'm also upvoting the workarounds that look good to me.
-
DisgruntledGoat almost 15 yearsThanks for the great explanation of how the clipboard works, I kinda guessed it worked something like that but never understood it 100%.
-
Ben Turner almost 15 yearsKudos to RBerteig! That was an informative explanation of the status quo.
-
Leminnes almost 14 yearsJust in case you didn't figure out a faster way: The AutoHotKey way is shown in the "paste as plain text" in the url below. This is fast because AHK itself is doing the flattening. It does not depend on other programs. I used to use PureText but I like to put this stuff into my already-running AHK script. superuser.com/questions/7271/most-useful-autohotkey-scripts/…
-
Jonas Stein almost 6 yearsBe on alert, that this is a compiled program which can do anything on your system. Where is the source code?
-
Scott - Слава Україні almost 6 yearsOf course you could say the same thing about Windows itself.
-
noseratio almost 3 years@JonasStein, I maintain #DevComrade, an open-source alternative that enables Ctrl+V to paste unformatted by default for all programs: github.com/postprintum/devcomrade#what-is-it