Question

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: https://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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top