Paste not working the way it should?

Many (if not most) websites are broken in various ways these days. One of the favorite bugs of web developers is breaking copy&paste. For whatever reason pasting text into form fields is not working at all on many websites.

Today gvim was annoying me with a different misfeature: Pasting text with more than one line is always inserted on a new line above the cursor. I want the text pasted where the cursor is, not where vim’s developers think they would like it. That’s the last straw.

To solve this problem for all times I wrote a small script which converts the paste buffer into keystrokes. For all applications it will look as if that text has been entered with the keyboard. Here is the code of my pastinator.py. Download it and bind it to a key, for example Tux+V (Windows+V) or any other key you like.

Now always when I press Tux+V I get the contents of the copy buffer pasted exactly how I want it.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>