IDE
Autocomplete and AI suggestions
The editor can help you write code in two ways. Autocomplete suggests names as you type. An inline AI suggestion writes the next part of your code, but only when you ask for it.
They are separate. You can use either one, both, or neither.
Autocomplete
Autocomplete shows a list of suggestions while you type. Use the arrow keys to pick one and Enter or Tab to accept it. Esc closes the list.
It is off until you turn it on. Sign in, open IDE settings, set Autocomplete to Standard, and choose Save. It is free on every plan, including the free account, and does not use any credits.
What you get depends on the language:
- Java, Python, C, C++, JavaScript, TypeScript, HTML, CSS and JSON. The suggestions know the language. Type a name and a dot, and you see what that thing really has. For example, after a string you see the string methods.
- C and C++ versions. The suggestions follow the version you picked, such as C99 or C++20, so you only see what that version has.
- The first suggestion can take a few seconds in Java, C and C++, while the language tools start. After that they are quick.
- Every other language. You get the language's keywords and the names already in your file.

Set Autocomplete back to Off if you want a clean screen, for example while you teach a class and want everyone to see the whole line being typed.
Inline AI suggestions
An inline AI suggestion is AI autocomplete that you ask for. Put the cursor where you want code and press Ctrl+I. On a Mac, press Cmd+I.

- The editor says Asking AI… this can take a few seconds. next to the cursor. Wait for the answer.
- The suggestion appears in grey text, right after the cursor. It is not part of your code yet.
- To accept it, press Tab. The grey text becomes part of your code.
- To dismiss it, press Esc. Typing anything or moving the cursor also dismisses it.
To stop a request that is still running, press Esc while the editor says Asking AI….
The AI reads the code before and after the cursor, so the suggestion fits what you already wrote. If it has nothing useful to add, it says No AI suggestion here.
Inline AI suggestions work for every signed-in account, whatever Autocomplete is set to. There is nothing to turn on.
Inline AI suggestions use the same credits as the AI assistant. See AI credits for how many your plan gives you. When they run out, the editor tells you next to the cursor.
If a teacher has turned AI off for the students on their account, inline AI suggestions are off for those students too.
The AI menu
The AI menu lets you ask the AI to write, fix or explain code without leaving the editor. Press Ctrl+K to open it. On a Mac, press Cmd+K. If you select code with the mouse, you can also click Edit with AI next to it.
The menu opens under the line you are on. You can type what you want, or pick an option. Each option has a number, so Cmd+K then 3 fixes the selected code straight away.
| Key | Option | Works on |
|---|---|---|
| 1 | Suggest code here | The cursor. Same as Ctrl+I. |
| 2 | Fix the error from my last run | The selection, or the whole file |
| 3 | Fix the selected code | The selection |
| 4 | Explain | The selection, or the whole file |
| 5 | Add comments | The selection, or the whole file |
| 6 | Make it simpler | The selection |
| 7 | Make it faster | The selection |
An option is greyed out when it cannot be used, and the menu says why. For example, Fix the error from my last run needs a run that failed.
To ask for something else, type it and press Enter. With code selected, the AI changes that code. With nothing selected, it writes new code at the cursor.
Check the change before it goes in
The AI never changes your code on its own. It shows a preview first:
- Lines it removes are red and crossed out.
- Lines it adds are green.
- One sentence says what it changed.
Press Tab to accept the change, or Esc to reject it. Not quite right? Type what to change, for example "use a for loop", and press Enter. The AI changes its suggestion, and you see a new preview.
Explain does not change your code. The answer appears in the menu. To ask more, type a follow-up question and press Enter.
While the AI works, the menu shows a small animation and the text box is locked. Press Esc to stop.
To keep going in a bigger space, choose Continue in AI tab. The conversation moves to the AI tab, and you can carry on from there.
AI menu examples
Each example below is a real answer from the AI.
Fix the selected code
This binary search never finishes, because low = mid can stop the search from
moving. Select the function, press Cmd+K, then 3.

Fix the error from your last run
This Java program stops with a NullPointerException, because there are no
bananas in the map. After the failed run, press Cmd+K, then 2. You do
not need to copy the error: the AI reads it from the output.

Explain, and ask follow-up questions
Select code you want to understand, press Cmd+K, then 4. Then ask a follow-up question in your own words.

Make it faster
This function compares every email with every other email, which is slow on a long list. Select it, press Cmd+K, then 7.

Make it simpler
Deeply nested if and else blocks are hard to read. Select them, press
Cmd+K, then 6.

Add comments
Select code that has no comments, press Cmd+K, then 5. The code itself does not change.

Write new code from your own words
Put the cursor where the code should go, press Cmd+K, and type what you want. Press Enter.

On Windows and Linux, press Ctrl+K instead of Cmd+K.
What next
Editor settings lists every other setting.
Keyboard shortcuts lists every key the editor understands.
The AI assistant answers questions about the code you have open.