On a german keyboard, the CTRL (control) key is labeled STRG (which is supposed to be short for the german word for control, “Steuerung”). I likely annoy a lot of people (especially at work) because during some time at computer science in school, we happened to start calling that key “strong” with proper attention to pronouncing it incorrectly. No sharply enunciated “s” in the beginning, instead a “sch”-sound as in “ash” or “shame”. Phonetic spelling of it would be “ʃtrɒŋ”. I still keep calling the key that and can’t (plus don’t want to) get rid of that habbit. When I tried to explain a new copy/pasting technique I found out about to two workmates the other day, things got particularly hilarious.

So anyway, I found a way of copy- and pasting in linux that I found particularly useful. In linux, there are two clipboards in place. The first one is filled by just highlighting text with your mouse. No need to press any buttons. By default, you can paste what’s in this buffer by pressing the mouse wheel or by pressing the left and right button simultaneously. If you’re in a shell environment, you can also paste the content by using the keyboard shortcut SHIFT+INS.

The second clipboard is filled by highlighting some text (which also copied the text to the first clipboard btw) and then pressing ʃtrɒŋ+C, just like everybody’s used to. Pasting is a matter of ʃtrɒŋ+V. Both operations are usually also available through a context menu after right-clicking the highlighted text.

If you’re in a shell however and want to use ʃtrɒŋ+C/V, you end up in conflicts, since ʃtrɒŋ+C is a common shortcut for cancelling the current command. So even if you highlighted text before pressing those keys, the text will not be inserted into the second (as I started calling it above) clipboard but instead you will cancel whatever operation is just running in your shell. So if I wanted to use this clipboard from that environment, until last week I used the mouse (to get to the context menu) to do so. It sometimes comes in handy to have two clipboards at hand. One operation I frequently use this for is when editing simple html. Having <li> in one and </li> in the other clipboard comes in real handy when writing lists.

Last week, there was someone working in our team for a couple of days on a trial basis to find out whether he fits into our team and he showed me a way to use both clipboards without using the mouse for anything but highlighting text. Pressing ʃtrɒŋ+SHIFT+C/V makes the second clipboard available in the shell! So now, after having inserted the li-tags into the clipboards, there’s not need to touch the mouse again. It’s like SHIFT+INSERT, type the list item, ʃtrɒŋ+SHIFT+V and repeat. Great!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s