Text

Most of the time typing in Quicksilver’s first or third pane selects an object such as a file, contact, song, etc. Some actions like Search For… or Rename… take an argument in the third pane which is arbitrary text. This section is about entering arbitrary text in the first pane. Type . or ' to enter text mode. In B51, some people with non-US or Qwerty keyboards report problems using one of these, but often the other works. This is a regular Cocoa text field so all the text editing key bindings work. E.g., D deletes a character, F moves forward a character and B moves back a character.

Formatting also works; pasting formatted text into the first pane preserves the formatting (fonts, colors, alignment) of the source. Furthermore, this stays in effect in future text panes until differently formatted text is pasted in or it’s explicitly changed. The standard editing keys work though some only work if the Quicksilver menu is visible, which usually only happens when the Preferences window is open. Change fonts from the Font palette available via T when the menu is visible. Change colors with the color palette but this only comes up via the menu since the C key binding is interpreted as the action associated with C, probably Copy to Clipboard. Changing alignment works even if the menu isn’t visible; use { to make the text aligned on the left side.

A common way to bring text into Quicksilver is to use the Send to Quicksilver Service or the predefined triggers Command Window in Text Mode or Command Window with Selection, commonly bound to . Unfortunately Front Row started using that key binding and now Quicksilver doesn’t assign a shortcut by default. See Combining Activation and Selection for more information. These mechanisms work with Cocoa applications, but note that Microsoft Office and Firefox are currently not Cocoa applications.

Basic Text Actions

When dealing with text the two actions that come to mind first are Copy to Clipboard and Paste. However since C and V perform these actions in just about every application, I rarely use them in Quicksilver. The exception is when I look up something in Quicksilver like an address, phone number or filename and then Paste it somewhere. After finding the item in the first pane, just type . to change the selected item to text mode, then use the Paste action or any other text action. E.g., look up a friend’s contact info, tab and select their home address. Then type . and edit the address to just the zip code. Now Paste it into a weather web site, or better yet, use the Find With… action to call up a weather search on the zip code.

For commonly pasted text, like a signature for a Mail message or a long phrase, consider a trigger with the text and the Paste action. The Shelf as described in Clipboard & Shelf is also a good way to do this.

The Type Text action is similar to the Paste action, but will not put a copy on the clipboard. Also, more than just pasting the text, the application will treat the text as if the user had actually typed it, meaning it might perform commands based on the text. Use and enter those special characters as text. E.g., the text Boston⇥MA⇥02134 (those are tab characters) with the Type Text action completes three different fields in a web form all at once. Using the Paste action would put the whole thing, including the tab characters, into the first field.

Most copy and paste commands on the mac preserve the formatting of the source, but this isn’t always wanted. A clever way around this is to use the command line tools pbpaste and pbcopy to take what’s already on the clipboard and copy it again but without the formatting. These are used from a Terminal shell but the Terminal Module’s Run Command in Shell action can be used instead; which means a trigger can be created for it. Create a trigger with pbpaste | pbcopy in the first pane and Run Command in Shell as the action. I have this bound to C. I also renamed the trigger to be Remove Copy Formatting.

In addition to Run Command in Shell, small scripts can be entered in the first pane and run in a new Terminal window with the Run a Text Command in Terminal action. This is an easy way to run the top command and if used often makes a good trigger. Enter multiple commands to run by separating them with a new newline entered with . For AppleScripts instead of shell scripts use the Run as AppleScript action. Use these with to easily run scripts from e-mail messages or posted on forums (but of course, use with caution).

The Large Type action will show the text in a giant window visible from across the room. Click anywhere to close it. It’s great when looking up a phone number. The more text there is to display, the smaller it gets. Some use it to view lyrics highlighted on a web page.

The Display Dialog action is similar to the Large Type action but it uses a standard dialog box with an OK button. The advantage is that it can be moved around and it will say visible until the OK button is clicked. It is disabled by default, enabled it in the Action preferences.

The Speak Text (Say) action uses macOS’s speech synthesizer to speak the text out loud. It is disabled by default, enable it in the Action preferences. The voice used is set in the Speech System Preferences in the Text to Speech tab. Try it with the Run after Delay… action to create a voice alarm. See the Command Objects and Droplets section for more details. I thought it might be useful for pronouncing foreign words but my attempts at Japanese and French with B51 didn’t work very well.

System Services are some of the more underutilized features of macOS. Applications register features that are available system-wide in every application’s menu. Many services are only enabled while text is selected. The Services Menu Module plugin makes all the system Services available in Quicksilver. E.g., Sticky Notes users will like the Make New Sticky Note action.

The Web Searches section describes using the Web Search Module plugin. With text in the first pane, use the Find With… action and choose a saved web search in the third pane. The search results appear in the default browser. See the Web Searches section for configuration details and how to make a trigger with the Current Selection proxy object.

The Mail section describes various e-mail actions from the Mail Support plugin. The three E-mail To… actions (in Compose, Send and Send Directly variations) send text in the first pane to a contact or e-mail address in the third pane. See the Mail section for details on configuration and the differences in the three variations.

The Chat section describes the instant messager actions. IM to Account… sends the text in the first pane as an instant message to a contact or IM account in the third pane. The iChat plugin supports setting the away message to text in the first pane with the Set iChat Status action.

The Calendar section describes creating calendar events and to-dos in iCal and Google Calendar. These use specially formatted text to not only name the event or to-do but to set dates, times and priorities. Create iCal Event and Create iCal To-Do take a calendar as an argument in the third pane.

String Sniffing

TODO

Dictionary

The Dictionary Module plugin provides access to the macOS built-in dictionary. Enter a word in the object pane and use either the Dictionary or Thesaurus actions to access macOS’s dictionary. Regardless of how the Dictionary preferences are configured, the Dictionary action shows the definition in a smaller panel (shown here).

The Services Menu Module plugin makes Look Up in Dictionary available and is another way to do the above. Look Up in Dictionary opens the Dictionary application with the full window. Unfortunately there is a bug in 10.4 so that if the Dictionary application isn’t already running, it’s opened but the word to lookup is not entered automatically. It works fine if the Dictionary is already running and the Dictionary action seems unaffected by this bug. I have a trigger for the proxy object Current Selection with the Look Up in Dictionary action bound to D for those applications (e.g., Preview) that don’t support the Cocoa key binding of D.

The Dictionary Module also adds the Define with dict.org action which is similar but aggregates definitions from several web sites and displays them in a simple HTML viewer built-in to Quicksilver. It usually provides the most complete definition but the formatting isn’t as nice.

Spotlight

When OS X 10.4 shipped with Spotlight there was a lot of confusion as to what it would mean for Quicksilver. As is probably clear by now the two are quite different. Quicksilver can’t search inside files but can do much more than just open things. One of the biggest criticisms of Spotlight is that it starts searching immediately as the query is typed. Quicksilver solves that problem. The Spotlight Module plugin installs three actions for text objects. Spotlight in Window runs the search in a Spotlight window. Spotlight in Finder runs it in a Finder window, like when editing a Finder smart folder. Spotlight in Command returns the results in an object pane results list in a new command window. None of these searches start until the command is executed. Spotlight saved searches, can be brought into the first pane and executed with the Run Search with Spotlight action.

Text Files

The Create File… action makes a new text file with the object text as the contents (not the name). It prompts for the new filename (and location) with a standard apple save dialog, saves the file, and then shows a new command window with the new file as the object.

The Text Manipulation Actions plugin installs actions to manipulate the contents of plain text files (which must end in a .txt extension). These are great for managing a to-do.txt file. With text in the first pane, use the Append To… action and specify a file in the third pane to add the text to the of the file. The Prepend To… action works the same way but adds the line to the beginning of the file.

The reverse commands are Append Text… and Prepend Text… which take the file in the first pane and the text in the third pane. Use these to create triggers to easily add things to a to-do.txt file.

I have a trigger defined for NextAction.txt (Append Text…). Whenever I think of stuff to do, I type A and type the idea into the third pane and continue with what I was doing. Then I review the file regularly in my text editor. I have another trigger on A using the Current Selection proxy object that lets me select text in any Cocoa application and append it to my NextAction.txt file. It’s defined as: Current Selection (Append To…) NextAction.txt. To use it for several files, leave the third pane blank and enter the file after invoking the trigger.

The Text Manipulation Actions plugin also allows Quicksilver to access the individual lines of a text file by typing into one. With a text file in the first pane, even though there is no > next to it in the results list, typing or / will open a new results list with the lines of the file. Even though the lines have a > next to them, typing won’t do anything. With the command preference Show children split view enabled, the right-hand results list pane acts as a (slow) preview window showing the contents of a text file. Note that for .html files instead of each line being shown, instead each link is shown. See the Web Pages section for more details of .html files.

With text lines selected in the first pane, all the text actions are available and a few more. The ominously named Delete Line (UNSTABLE) will remove the line from the file. Yes, be careful about using it and it doesn’t always work. Less risky is Change To… which takes new text in the third pane and will replace the text in the file with it. In addition, the Prepend Text… and Append Text… actions can work on text line references. Their argument is added as a new line before or after the line respectively. I had a problem with line-endings when using Prepend Text… on the first line in a file.

The BBEdit Module plugin adds one action which works on text lines. Use Select in BBEdit to open the file in BBEdit on that line. It also adds a catalog source under Modules called BBEdit Recent Documents but as of B51 it doesn’t seem to work.

Specially Formatted Text

The above actions work for all text, but Quicksilver recognizes some text forms and provides more actions for them and often chooses a special default action. E.g., if the text in the first pane looks like an e-mail address (i.e., [email protected], with at least one @ and one period) then the E-mail Item… actions are available. If the text looks like an URL, then the Open URL action is available. Depending on how the actions are ranked in the Actions Preferences these might become the default actions. In these cases the background of the pane changes to include a faint version of the e-mail or URL icons. These are the only two special forms that Quicksilver recognizes that I know of, but see below for how to perform math calculations.

Math Calculations

The Calculator Module plugin adds two actions called CalculatorCalculateAction and a preference pane called Calculator. It allows math expressions to be entered as text in the object pane and Quicksilver will compute the result. By default it uses the unix utility bc to compute the expressions but this can be changed in the Calculator Preference pane to dc for an RPN calculator. bc understands the basic math expression including addition with +, subtraction with -, multiplication with *, and division with /. Parentheses specify the order the operations. There’s much more it can do, to get the details look in the documentation (which for unix commands is a man page). In the Calculator Preference pane there is a button to bring up the man page in a Terminal window.

To perform a calculation, activate Quicksilver, type = to enter text mode, followed by an expression, e.g., 3+5. Type and the command window is replaced with a new one, with the result (in this case 8) in the first pane. Using = to enter text mode isn’t required, but it tells Quicksilver to default the action to CalculatorCalculateAction.

The Calculator Preference pane allows configuration of the behavior when the result is computed. By opening a new command window with the result it’s easy to choose an action like Copy or Paste to do with the result. But the default can be configured to display with the Large Type action or in a notification window like the iTunes module uses (or with Growl if it’s configured).

The Run as AppleScript action can also perform basic math calculations with +, -, *, and /. In fact, since text mode is a Cocoa field, the Services menu in available. Script Editor has a service called Get Result of Apple Script and it’s bound to by default. So another way to evaluate simple expressions is to activate Quicksilver, type . to enter text mode, type some simple expression, type A to select it all and then type \ to have the expression replaced with the result.

The Unit Conversion Module plugin installs the action Convert to Units… which does conversions using the unix units program. In the first pane enter a number and in the third pane enter the units to convert to. E.g., 10 m Convert to Units… ft. The result is shown in a new command window. The syntax is a little tricky so see the plugin’s documentation in the info pane or the units(1) man page for more details. In particular there must be a space between the number and the units.

For more advanced calculations and conversions use Google’s calculator. It can do temperature conversions, understands scientific notation and many many constants. Enter the expression in the first pane and use the Search With Google action (from the Services Menu Module plugin and the Safari service) or create a trigger for Google Search (Search For…). Compared to the other methods above, this one requires a network connection and shows the results in a browser but can do a lot more. Syntax details are described at http://www.google.com/help/calculator.html.