Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I would like to use Quicksilver to insert a given text in the active window at the current cursor location. Is this possible?

One solution might be that I have a collection of files with the required text snippets and when I type the name I get a command that says something like "Insert content of file in current document." However, I could not find such a command in the default list. I also tried to install the "Text Manipulation Plugin", but it appears that it doesn't offer this kind of functionality. One answer on Superuser suggests that this might still be possible, but did not reveal how: http://superuser.com/questions/113645/keyboard-macro-program-for-os-x

Alternatively, I have looked into Applescript and it seems to be an easy exercise there. But I wonder if there is any alternative to writing dozens of Applescripts and triggering them using Quicksilver.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Sounds like the exact use case for the Shelf Plugin for Quicksilver. That plugin gives you a place where you can put stuff (can be anything you can have in the first pane in Quicksilver, but in your case it will be text snippets) and then easily call them up again and use them.

For that to work you need to install both the Shelf Plugin and the Clipboard Plugin. Then you can call up Quicksilver, enter a text snippet in the normal Quicksilver text entry mode and choose "Put on Shelf" as action.

To see what's on the shelf, you call up Quicksilver, and use the shortcut ⌘+⌥+s. That brings up a little window showing you all the things on your shelf. when that window is open, you can also use the mouse to drag any text to that window to add it to the shelf.

The best way to use the things on the shelf is this: Set up a trigger with "Shelf" as the object and "Show contents" as action. That opens the contents of the shelf in the normal Quicksilver interface, so you can search them or just scroll through them. Once you selected the text snippet, you can use the "Paste"/"Paste as Plain Text" actions to paste it in your document.

There are some more cool things about that plugin: If you use the mouse from time to time, you can have easy access to the shelf window by dragging it to the side of the screen. If it's close enough to the edge of the screen, the window will slide into the edge and hide there. To call it up again, just move the mouse to that edge of the screen and it will slide out again. You can then use the mouse to drag-and-drop stuff from the shelf to wherever you need them.

The Clipboard Plugin has a similar window that provides a history of what you copied and pasted, which is also very handy.

share|improve this answer
    
I see that the shelf can be used to store and retrieve keyboard macros. But I do not yet understand how I can retrieve them without browsing the shelf. Could you describe step by step how I can set up a trigger that (as an example when pressing Cmd+Alt+Ctrl+2): 1. Opens the shelf, 2. selects (as an example) the 2nd item in the shelf, 3. pastes this item as plain text into the window that currently has the focus? –  user8472 Jun 28 '13 at 19:33
    
You're right, if you don't want to browse/search for you text snippet, you can't really do it with the shelf. Instead, you can set up a trigger directly. Just add a trigger, put the text you want to paste in the first pane (by pressing . to change to the text mode), select "Paste as Plain Text" as action, and set up your desired shortcut keys. –  HenningJ Jun 30 '13 at 13:22
    
Yes, this is exactly what I was looking for! Thanks, this solves my problem! –  user8472 Jun 30 '13 at 13:34

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.