More fun with xsel

Bind this to a keyboard shortcut:

xsel -i | pastebinit | xsel -o


It takes the current selection buffer, dumps it to a pastebin (pastebin.com by default) and replaces the contents of the selection buffer with the URL of the paste, ready for you to use anywhere.  Works in any program you like.