Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am looking for a clipboard manager, but I don't want one that just keeps a list so I can select an item to bring it to the front of the clipboard, nah, that's too easy.

What I am looking for is a clipboard manager where I can assign say
Ctrl+Shift+1 to paste the first item in the clipboard,
Ctrl+Shift+2 to paste the second item in the clipboard
...
Ctrl+Shift+9 to paste the ninth item in the clipboard
Ctrl+Shift+0 to paste the tenth item in the clipboard

why?
As we web developer I am often pasting alternating lines of code (remember, not all browsers support CSS3!),

<tr class="odd">...</tr>  
<tr class="even">...</tr>
<tr class="odd">...</tr>  
<tr class="even">...</tr>

So, the ability to just sit there doing
Ctrl+Shift+1 Enter

Ctrl+Shift+2 Enter

Would be a huge help,

I am using 12.10 with gnome-shell 3.6.2.

I have looked into gPaste and such, but none seem to have this feature.

share|improve this question
    
You didn't say which text editor you're using. This can potentially be handled by the editor itself, i.e. I can tell you how to do this with vim, but if you use a different editor it's not going to be helpful. Or maybe you want this to work system-wide? –  roadmr Feb 11 '13 at 21:39
    
also, you looked into "gpaste and such". Can you elaborate on which options you tried? Right off the bat I found glipper, which has "support for Actions", which may do what you want. –  roadmr Feb 11 '13 at 21:41
    
Why not use a editor with registers like emacs or vim instead? I personally doubt that you will find what you are looking for :( –  McNisse Feb 11 '13 at 21:46
    
I would prefer system wide, but, as a compromise, PHP Storm is my IDE. –  Hailwood Feb 11 '13 at 22:24
    
Have you seen askubuntu.com/q/11925/44179 ? –  Seth Feb 12 '13 at 3:19
add comment

1 Answer 1

I'm not aware of a clipboard manager that itself provides the feature you want, but there are two ways in which I imagine that Klipper could be incorporated in a solution.

  1. Klipper offers "Next History Item" and "Previous History Item" shortcuts that change the order of the clipboard history. Therefore, pasting the nth entry can be done by running the "Next History Item" shortcut n times, then running Ctrl+V (or whatever your paste shortcut is), and then -- to put the history back into its original order -- running the "Previous History Item" shortcut n times. Using this, your problem reduces to setting a shortcut that simulates entering a series of shortcuts.
  2. The command qdbus org.kde.klipper /klipper getClipboardHistoryItem n where the n at the end is a number (e.g. 0, 1, 2...) will output the nth clipboard history item. Using this, your problem reduces to the problem of setting a keyboard shortcut that will paste the output of a command.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.