If you use an editor which does not have a "Paste and Match style" option, and you want to copy/paste a fragment of web page or other rich text without all the formatting, use the following script:
#!/bin/bash<br>
pbpaste | pbcopy<br>
Save the script as, for example, poortextformat.command (as hinted here), change the permissions with
chmod a+x poortextformat.command
and that's it.
This hint is useful for example in Google Docs, as there is no option to paste plain text.
Mac OS X Hints
http://hints.macworld.com/article.php?story=2007100301534738