I've used EtherPad (http://etherpad.com/) successfully for collaborating on code. The only thing missing is syntax highlighting for languages other than Javascript.
On a similar vein, Gobby (http://gobby.0x539.de/) allows for real-time collaboration on code, and IIRC will syntax highlight anything supported by the GtkSourceView widget. The downside is that Gobby is an installable application, and needs a hole punched through NATs for one user.
You can just run it as a headless daemon on a server somewhere.
I still prefer Gist (gist.github.com) for things like this--I like the fact that the code sticks around.
How does campfire handle this? -- it seems like something the 37signals people would have put time into.
They detect when you paste something and use a fixed-width font on it. Also, they truncate it and link to a full version.