LatteAI in the Editor
In a document, LatteAI does two things: it suggests what comes next while you type, and it changes or writes text when you say what you want. Both work in project windows and in documents opened by themselves.
Suggestions as you type
When you pause in your typing, LatteAI shows what it would write next, in grey after the cursor. A suggestion can be the rest of a line or several lines. In a project, it draws on the project's other files as well as the document in front.
- Press tab to take the whole suggestion
- Press option right to take its next word
- Press escape to dismiss it, or just keep typing
If you type what the suggestion says, the rest of it stays. Taking a suggestion is a step of its own for Undo.
Suggestions are offered when there is one cursor and nothing selected. They are not offered in the middle of a word, in an empty document, or while the CodeSense list is showing.
To ask for a suggestion without waiting, choose Edit ⟩ LatteAI ⟩ Suggest Here (control option space). This works even when suggestions as you type are turned off.
To turn suggestions off, uncheck Edit ⟩ LatteAI ⟩ Suggest as I Type.
Editing in place
One command asks LatteAI to change or write text. It is the first item of Edit ⟩ LatteAI, its shortcut is control space, and it is named for what it will work on:
- Edit Selection… when text is selected
- Write Here… when the cursor is on an empty line
- Edit Document… otherwise, for the whole document
You can also right click in the text and choose Edit with LatteAI….
A bar opens in the text. Say what you want, such as "make this a list" or "a footer with three columns", and press enter. While LatteAI is writing you can press escape to stop it.
The change is made in the document, and marked so that you can see it: lines that were added or changed are tinted green, what was removed is shown above them in red, and the bar counts the lines added and removed. Then:
- Press enter or click Keep to keep the change
- Press escape or click Undo to put the text back as it was
- Or type another instruction and press enter to have the result changed again
A change you have kept can still be undone with Edit ⟩ Undo.
With the field empty, up and down step through your earlier instructions, and the clock button lists them.
If what you are asking for is bigger than this document, press shift command enter in the bar, before anything has been changed, to send your words to the conversation, where LatteAI can work across the project.
LatteAI can take in about 24,000 characters at once. For more than that, select part of the text.
Hints
So that LatteAI is easy to find, Espresso shows two hints:
- When you select text, LatteAI's mark appears after the end of the selection. Click it to edit the selection.
- In an empty document, a faint line says which key has LatteAI write it.
To hide them, uncheck Edit ⟩ LatteAI ⟩ Show Hints in the Editor.