Special functions: include placeholder prompts, fill-in fields and menu options in snippets

This part of the special functions section explains the advanced placeholder prompts and menu options you can insert into TypeIt4Me snippets. It will show you how to set up template snippets that – as well as typing out pre-defined content – will prompt you for variable input as they expand. There are a couple of different kinds you can use for various use cases. Let’s look at each in turn.

Insert an “autocue” placeholder prompt

An “autocue” is a placeholder for variable input, that you can insert anywhere in a snippet. It’s represented by a descriptive label, bookended by an opening hourglass icon and a closing scissors icon. The autocue will effectively pause mid-expansion and prompt you to type something over its label. Once you’ve typed your variable input, you press the forward arrow key to resume expansion of the snippet and TypeIt4Me will type out the next part of the content.

You can include as many autocues in a snippet as you like. Here’s how to insert one:

  1. Open the main TypeIt4Me window and select a snippet.
  2. Place the cursor in the editing area, at the point where you want the autocue prompt to appear during expansion.
  3. Click on the “Insert a special function” button in the TypeIt4Me toolbar.
  4. Select “autocue” from the menu. You will see the word “autocue” appear in your snippet, sandwiched between an hourglass icon and a scissors icon.
  5. Select the word “autocue” by double-clicking on it.
  6. Type a descriptive label that will prompt you for input as the snippet expands.

When you type the abbreviation for a snippet that contains one or more autocue prompts, that snippet will expand in stages inline, i.e. directly in the application you’re typing in. Any content that precedes the autocue will expand as normal, then expansion will pause and the descriptive label / prompt will appear highlighted, ready for you to type over. Once you’ve typed over that placeholder, press the forward arrow key on your keyboard. Expansion will resume. Repeat the process for any further autocues contained until the complete snippet has expanded in full.

*You can abort, i.e. stop expanding an autocue snippet before it has completed. To exit expansion of an autocue snippet, you must press the esc key. If you forget to fully complete the expansion of an autocue snippet or abort it by pressing esc, you may find that subsequent TypeIt4Me abbreviations won’t expand when typed.

Create boilerplate snippets with pre-defined options or prompts to fill in

You can set up template snippets that contain multiple synchronised instances of variable input. For example, you might insert several linked prompts for a person’s name in various parts of a boilerplate email. During expansion, whatever you type in one of them will instantly appear in the other linked fields, so you don’t have to type it out several times. To see this in action, take a look at the cgts example in the Demo Snippets set that comes with TypeIt4Me.

When you invoke the snippet, before being inserted it will open in a staging window to allow you to fill in content. Clicking OK will then place the full snippet with your changed variables where you want to insert it.

There are three supported types of variable input: a single-line text input field, a multi-line text input field and a pulldown menu from which you can select from a list of pre-defined options. You can include various combinations of them within a single snippet, with as many instances as you like.

Insert a single-line input field prompt

Let’s look at how to craft a template snippet that will spawn a staging window, in which you can fill in a single-line input field and have that synchronise with further instances prior to the snippet content being expanded.

You can include as many single-line fill-in prompts in a snippet as you like. Give them all the same name, then whatever you type in the first field during expansion will automatically be replicated in all further instances that share that name. Here’s how to insert one:

  1. Open the main TypeIt4Me window and select a snippet.
  2. Place the cursor in the editing area, at the point where you want the prompt to appear during expansion.
  3. Click on the “Add an option or prompt” button in the TypeIt4Me toolbar.
  4. A “New” token will appear in the snippet and a popover will open. Make sure “Single-line” is selected in the fill in type pulldown menu.
  5. Give it a name. This should describe what you’ll be prompted for, e.g. customer_name or product.
  6. Specify a default value, i.e. what it should say if you expand the snippet without changing anything. (If you’ve already created a fill-in prompt with the same name and you want this one to automatically match its output, leave it as default.)
  7. If you expect you’ll mostly be typing longer or shorter words, phrases and / or numbers in the field when you come to use the snippet, change 20 in the Width box to something more suitable.
  8. Click OK to save.

Insert a multi-line input field prompt

Sometimes, a single-line field might not be enough for you to squeeze in all the variable input content you’ll be inserting. Let’s examine how to go about crafting a template snippet in which you can fill in a multi-line input field of a specific height that will accommodate as much text input as you can throw at it.

You can include as many multi-line fill-in prompts in a snippet as you like. If you give them all the same name, whatever you type in the first field during expansion will automatically be replicated in all further instances that share that name. Here’s how to insert one:

  1. Open the main TypeIt4Me window and select a snippet.
  2. Place the cursor in the editing area, at the point where you want the prompt to appear during expansion.
  3. Click on the “Add an option or prompt” button in the TypeIt4Me toolbar.
  4. A “New” token will appear in the snippet and a popover will open. Select “Multi-line” as the fill in type in the pulldown menu.
  5. Give it a name. This should describe what you’ll be prompted for, e.g. customer_name or product.
  6. Specify a default value, i.e. what it should say if you expand the snippet without changing anything. (If you’ve already created a fill-in prompt with the same name and you want this one to automatically match its output, leave it as default.)
  7. Optionally, you can experiment with changing the values in the Width and Height boxes to better accommodate the length of your expected input. For up to three lines of text, enter 3 in the Height box, for example.
  8. Click OK to save.

Insert a menu of options to pick from

TypeIt4Me can prompt you to select from a pulldown menu of pre-defined options. This can come in handy if, for example, you’re composing a standard email reply in which the only variable is the type of product being discussed.

You can include as many popup menu prompts in a snippet as you like. Here’s how to insert one:

  1. Open the main TypeIt4Me window and select a snippet.
  2. Place the cursor in the editing area, at the point where you want the prompt to appear during expansion.
  3. Click on the “Add an option or prompt” button in the TypeIt4Me toolbar.
  4. A “New” token will appear in the snippet and a popover will open. Select “Popup menu”  from the pulldown.
  5. Give it a name. This should describe what you’ll be prompted for, e.g. customer_name or product. (If you then add single-line fill-in fields with the same name elsewhere in your snippet, these will automatically be populated with whatever you pick from the menu.)
  6. Click the + button to add items, typing in what each one should be called
  7. Click one of the radio buttons to specify a default value, i.e. what the initial selected menu item should be. This is what will be inserted if you expand the snippet without changing anything.
  8. Click OK to save.