Editing Expressions Using the Ctrl+Space Object

In addition to being used to insert new objects into an expression, the autocomplete popup can also be used with the CtrlSpace object to edit (or "rename") an existing expression.

The autocomplete popup can be used to directly insert objects into an expression or to wrap an object around an expression using the Space object as an placeholder. When used with the CtrlSpace object, the autocomplete popup can also edit or "rename" an existing expression.

Suppose you have the expression:

| x + y |

and you want to change it to a factorial:

(x + y)!

The steps to do this are:
  1. Highlight the | x + y | expression (the whole expression, not just x + y)
  2. Press Ctrl + Space - the highlighted expression becomes the first parameter of the CtrlSpace object. It looks similar to the Space object, but includes a small "^" before the space between parameters.
  3. Type "factorial" into the empty box.
  4. Select (x + y)! from the autocomplete popup.

This process also works on expressions with multiple parameters. For example, if you have the expression

x ≥ 0

but want the expression x > 0, you can highlight the whole expression, press Ctrl + Space and type "greater" into the empty box on the right-hand side of the CtrlSpace object. The expression x > 0 will be one of the options in the autocomplete.

It also works on objects that are normally constructed using single character keystrokes like "+" and "=". So to convert "a + b" into "a = b", you would just highlight "a + b", press Ctrl + Space, type "equal" and select the result from the autocomplete popup.

The Ctrl + Space process can be thought of as a "rename" of the highlighted object that keeps the existing list of parameters. If you want to insert a new expression around an existing term, you want to use the Space object. If you want to replace a term with another term and have the replacement term contain the parameters of the original term, then you want the CtrlSpace object.