The source editor supports command completion. Type the first few letters of a word or command and hit the escape key. The rest of the command will be entered. Hitting escape again will cycle through all possible completions.

The character which triggers command completion can be changed from "escape" to "tab" in TeXShop Preferences.

TeXShop stores these completions in a Completion file, which can be edited within the program. To add a word to the dictionary, select the word and choose "Add Word" in the Completion submenu of the Source menu. Select "Open Completion File" in this Completion submenu to open the file for direct editing. Notice that completions can be more complicated than just a single word; special commands are available to place the cursor in a convenient spot after completing the command. Examine the Completion file for details.

Command completion can deal with complicated commands with multiple parameters. For example, type "\newcom" and hit escape several times to reveal versions of this command with two, three, or four arguments. Select the command with four arguments. Notice that the cursor is placed on a centered dot --- that is, a mark --- where the first argument will go. The mark is selected, so when you start typing, you'll replace the mark with desired text. When that entry is complete, select the "Next Mark" command in the Completion submenu. This command has a keyboard shortcut, so after practice it can be selected without going back to the menu. The cursor will skip to the second mark and select it. Typing immediately replaces the second mark with desired text there. Continue until all four arguments of the command are filled in.

Since moving from mark to mark is often required, TeXShop supports additional keyboard shortcuts beyond those listed in the Completion/Marks menu. When the escape key is used to trigger command completion, option-escape will move to the next mark and control-escape will move to the previous mark. When the tab key triggers command completion, option-tab moves to the next mark and control-tab moves to the previous mark. If you use a third party utility with other uses for these shortcuts, the TeXShop shortcuts can be turned off with a hidden preference. See the "Hidden Preference Items" section of TeXShop Help.

The current extensive Completion file was written by Herbert Schulz, who added various "Mark" commands to TeXShop. Schulz wrote an extended document describing this facility. That document is available in ~/Library/TeXShop/CommandCompletion.

If the Escape key is pressed but there are no completions for the given source in the Completion file, then TeXShop reverts to an alternate completion method provided by the Apple Cocoa environment. A list of dictionary phrases appears in a popup window and the user can select one of them. The phrases at the top of this window are taken from surrounding text in the source and thus often the intended completion.

Basic Help
Command Completion