How the LaTeX editor's command autocomplete, environment and document-class snippets, bracket auto-closing, and find & replace bar work in Coauthor.
Autocomplete, Snippets, and Find & Replace
The LaTeX editor helps you type less and mistype less: it suggests commands as soon as you type a backslash, expands environments and whole document skeletons, closes braces and math delimiters for you, and has a find & replace bar for the current file.
Command Autocomplete
Autocomplete opens automatically; there is no shortcut to force it.
- Type
\followed by the first letters of a command, for example\sec. - A popup appears under the cursor listing matching commands with a short description, for example \section — Section heading. Matching is by prefix and shows at most 15 entries.
- Use Arrow Down / Arrow Up to move through the list, then press Tab or Enter to insert the selection, or click an entry with the mouse.
- Press Escape to dismiss the popup and keep what you typed.
The popup does not open inside a % comment, when the cursor is immediately followed by a letter, or when what you typed already exactly matches the only remaining command.
The list covers about 160 commands and environments: structure (\documentclass, \usepackage, \section family, \tableofcontents, \appendix, \input, \include), text formatting (\textbf, \emph, \footnote), references and citations (\label, \ref, \eqref, \cite, \citep, \citet, \autocite), figures (\includegraphics, \caption), and common math (\frac, \sqrt, \sum, \int, Greek letters, arrows, set symbols).
Snippets
Many completions insert more than the command name and put the cursor where you type next:
| You accept | You get |
|---|---|
\section | \section{} with the cursor inside the braces |
\begin{figure}, \begin{table}, \begin{equation}, \begin{itemize}, ... | The full \begin{...} ... \end{...} block on separate lines with the cursor in the middle |
\begin{align}, \begin{cases}, \begin{pmatrix}, \begin{bmatrix} | The matching amsmath environment |
\begin{theorem}, \begin{proof}, \begin{lemma}, \begin{definition} | Theorem-style environments (you still need amsthm and a \newtheorem) |
\begin{frame}, \begin{block}, \begin{columns} | Beamer slide building blocks |
Environment completions appear when you type \begin{ followed by the first letters of the environment name.
Argument Completion for Classes and Packages
When the cursor is inside the braces of \documentclass{} or \usepackage{}, the popup switches to argument mode:
\documentclass{suggests article, report, book, letter, beamer, memoir, standalone, scrartcl, scrreprt, scrbook, IEEEtran, amsart, revtex4-2, elsarticle, and acmart. Accepting one on an otherwise empty line replaces the line with a complete starter document:\documentclass, sensible\usepackagelines,\title,\author,\begin{document}...\end{document}, with the cursor placed in the body. This is the fastest way to start a file from scratch; see Your First LaTeX Document.\usepackage{suggests common packages with a one-line description: amsmath, amssymb, amsthm, graphicx, hyperref, geometry, babel, booktabs, tabularx, xcolor, listings, tikz, pgfplots, natbib, biblatex, cleveref, float, caption, subcaption, microtype, enumitem, fancyhdr, siunitx, and a few more. See Packages and the Preamble.
Auto-Closing Pairs
| You type | Editor does |
|---|---|
{ or [ | Inserts the closing } or ] and leaves the cursor between them; with text selected, wraps the selection |
$ | Inserts $$ with the cursor in the middle, or wraps the selection in $...$ |
} , ], or $ when the same character is already to the right | Steps over it instead of inserting a duplicate |
} right after \begin{name | Completes to \begin{name}, adds an empty line, and inserts \end{name} on the line below, with the cursor on the empty line |
Backspace between an empty pair such as {} or $$ | Deletes both characters |
Auto-closing is skipped inside comments.
Find & Replace
- Press Ctrl+F (Cmd+F on macOS). A bar slides in above the editor with a Find field and a Replace field. Pressing Ctrl+F again closes it.
- Type in Find. Matches are highlighted in the file and the field shows N of M (or No results).
- Move between matches with Enter / Shift+Enter in the field, the up and down chevrons, or Ctrl+G / Ctrl+Shift+G anywhere in the editor.
- Toggle Aa for a case-sensitive search.
- Type in Replace and click Replace (or press Enter in the field) to replace the current match, or All to replace every match.
- Press Escape or click the X to close the bar. Highlights are removed when it closes.
Find & replace works on the file you have open. To change something across several files, ask the AI coauthor, which can edit multiple documents in the folder.
Go to Line
Press Ctrl+Shift+L, type a line number in the Go to Line dialog, and press Enter or click Go. This is handy after reading a line number from the error panel. All editor shortcuts are listed in Keyboard Shortcuts.
Related articles
Prefer to ask?
Inside Coauthor, ask the AI coauthor how any feature works — it answers from these same help articles. For anything else, use the ? button in the top-right corner of the app.