Extending Quicksilver’s append to file


A few years ago, Merlin Mann wrote up this great tutorial on how to append a string to a text file from anywhere, a topic which was mentioned again a little later. Quicksilver’s come a long way since then, and many of the limitations present back then no longer apply. Throw in some Proxy Objects, and you’ve got yourself a really big time-saver that can apply to your global workflow.

The Basics

Essentially, the “Append Text” command is used like so:

Standard QS Append text to file

Alternatively, as with most Quicksilver commands, it can be used by swapping the subject and indirect selectors:

Append QS with file first

However, this method is very limited. Mainly, it’s just too much effort to navigate to the appropriate file, especially if it’s one that’s been created recently and is yet to achieve a high rank. It’s also a bit of a hassle to have to type the text in. We can easily overcome these using triggers.

Triggers

In Quicksilver’s preference pane is a “Triggers” section. Under that it is possible to create shortcuts for commands that may need to be used regularly. Adding a command to append text to a file is often set up in the following manner.

Append with blank text

If you’re wondering, to get the indirect selector remain blank you need to press escape to get out of text-mode, then press Cmd-X to clear the selector.

Proxify

Where the above method fails, is if you’d like to be able to select a string of text and have it append to a file. For that, the use of the Proxy Object “Current Selection” is quite beneficial.

Append from selection

You can use this on text clippings from the Finder, selections from Safari, and most Cocoa applications. A really nifty way to use this feature would be to mimic the global todo service being released in Leopard. Simply add a trigger to append the selected text to a todo.txt file somewhere on your hard drive! I know people are always looking to have the ability to append text from the clipboard into a file. You can do that just as easily:

Append QS From Clipboard

Further still

Up to this point, all the techniques described have some minor limitations. For instance, if you have multiple files to which you’d like to append text, you’ll need to create individual triggers for each file you have. With some creative thinking, this hurdle can also be overcome. Take a look at the following trigger:

How to really append text to files in Quicksilver

The text comes from the selection, and all you have to do is specify which file you’d like to append to. Now, this is the reverse of the first technique. Instead of specifying only the text, we specify only the file. This is the trigger I personally use at it provides the flexibility to simply select the desired text or clipping and choose any text file to append it to. This is especially useful when taking feature requests for applications or answering support emails, if you don’t have an official system in place.

That’s it

You have just read through the different ways to append text to a file using Quicksilver. If you’re interested, there is also a “Prepend” action that adds text to the start, rather than the end of the selected file. A short summary:

Basic append commands
Text Append To File
File Append Text Text
Basic Trigger
File Append Text Blank (Cmd-x)
Append from selection
Current Selection Append To File
Append from clipboard
Clipboard Contents Append To File
Append from selection, choosing file
Current Selection Append To Blank (Cmd-x)

Was this helpful? Or do you know any other super-time-saving shortcuts and tips?


Back to Top ↑

6 Comments so far

Leave a comment
  1. 1

    What’s really blown me out of the water is to be able (with the Image Actions plugin) to just scale images. I’ve never been happier to convert an image’s file format or scale it proportionally. It’s really a swiss knife for anything with that plugin, especially graphic work.

    Although this is super nice, I’d love some way to organize all my plaintext files better. I’d hate to just dragnet them into Yojimbo or some other info manager, but they do need some managing. How do you manage your text files?

  2. 2

    I was also amazed by the image manipulation plugin. It seems so incredible that it can handle everything. And I’m pretty sure it works on .psd files as well.

    Regarding organization, I generally don’t have many text files around the place (and if I do, they’re a mess). However, applications like VoodooPad are really good for organization. As the developers say, “you put your brain in it”. I’ve just started using it and so far it’s proving to be easy to manage and has a great feature-set.

  3. 3

    Good stuff. I’d only like to say that some people get confused about reversing the arguments to Quicksilver commands. In general you can’t do this. In some cases different actions allow you to do so. In your example you’re using the Append To… and Append Text… actions (since they are similarly named some don’t notice they are different). There are only 9 such pairs of actions in Quicksilver, so it’s far from “most”. But they are obviously very convenient.

  4. 4

    Oh Snap! That last vague append command is exactly what I was looking for. Thanks!

RSS feed for comments on this post. TrackBack URI

Leave a comment

Comments may be edited for formatting.