How to copy and paste code without rich text forma

2019-01-16 22:00发布

I used to often find myself coping a piece of code from a website/Word document etc only to discover that when doing Paste I would end up with the desired code plus some extra HTML tags/text, basically extra formatting information.

To get rid of that extra ballast I would paste the text to the Notepad and then copy it again and then paste to the desired destination.

Pretty recently I discovered a simple and free tool for Windows called PureText that allows me to cut the Notepad step. It basically adds an extra keyboard shortcut e.g WinKey + V that will do the Paste action without formatting; just pure text. I find it very handy.

I was wondering what approach would you use yourselves? Are they any better/easier to use tools around?

13条回答
看我几分像从前
2楼-- · 2019-01-16 22:40

Look for a little clipboard icon that pops up at the end of the material you pasted. Click on this and choose "keep text only".

查看更多
干净又极端
3楼-- · 2019-01-16 22:42

If you're pasting into Word you can use the Paste Special command.

查看更多
混吃等死
4楼-- · 2019-01-16 22:43

I usually work with Notepad2, all the text I copy from the web are pasted there and then reused, that allows me to clean it (from format and make modifications).

You can download Notepad2 here

查看更多
Explosion°爆炸
5楼-- · 2019-01-16 22:43

If you are using MS Word then try ALT+E, S, U, Enter (Uses the Paste Special)

查看更多
\"骚年 ilove
6楼-- · 2019-01-16 22:49

I have Far.exe as the first item in the start menu.

Richtext in the clipboard ->

ctrl-escape,arrdown,enter,shift-f4,$,enter
shift-insert,ctrl-insert,alt-backspace,
f10,enter

-> plaintext in the clipboard

Pros: no mouse, just blind typing, ends exactly where i was before

Cons: ANSI encoding - international symbols are lost

Luckily, I do not have to do that too often :)

查看更多
我命由我不由天
7楼-- · 2019-01-16 22:50

Just for reference, under Mac OS X, you can use ⌘ Command+⇧ Shift+⇧ Shift+V to paste without formatting or with the "current" format.

Note: in some apps it's ⌘ Command+⇧ Shift+⌥ Alt+V (see "Edit" Menu → "Paste and Match Style")

查看更多
登录 后发表回答