---
schema_version: "1"
id: f611b5bd73cb7f78e9006b7b1635191acd0a376bc81e48385510cc23324c6b6f
title: Inline Auto Completion
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/einsteinfordevs/guides/files/einstein-inline.md
canonical_url: https://developer.salesforce.com/docs/platform/einstein-for-devs/guide/einstein-inline.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4b29227a17797a3bb10d772622c9d7482f709fba3f616787a3d7f3213e856022
products:
  - Agentforce Vibes Developer Guide (Deprecated)
  - salesforcedx
---
# Inline Auto Completion

Use AI-based autocomplete to accept suggestions for code as you write it inside your editor. Inline autocompletions can currently be triggered in Apex and LWC (JavaScript, CSS, and HTML) files.

![Inline Autocomplete](https://developer.salesforce.com/media/einsteinfordevs/af-inline.png)

## Enable or Disable Inline Autocomplete

Inline autocomplete is enabled by default. Click the Agentforce Vibes icon in the status bar, or run **Agentforce: Toggle Auto Completions** to toggle the feature off and on. Run the **Agentforce: Toggle Auto Completions for Current File Type** command to toggle the feature off and on for the currently active specific file type.

To enable or disable the Inline Autocomplete feature from Settings:

1. Select **File** > **Preferences** > **Settings** (Windows or Linux) or **Code** > **Settings** > **Settings** (macOS).
2. Under **Agentforce Vibes**, select **Enable Auto Completions** then select the language for which to enable the feature.

**note:** We disable inline autocomplete when you're idle. The sleeping Agentforce status icon lets you know that inline autocomplete is disabled. You can easily re-enable it by restarting VS Code, or by using the Option (⌥)\ hotkeys to manually generate autocomplete suggestions. Inline autocomplete also re-enables automatically after 1 hour of inactivity.

## See a Visual Notification for an Ongoing Completion

If you want a visual indication to let you know that Agentforce is busy generating an autocompletion:

1. Select **File** > **Preferences** > **Settings** (Windows or Linux) or **Code** > **Settings** > **Settings** (macOS).
2. Under **Agentforce Vibes**, check **Show an indicator to signal that Agentforce is making an autocomplete request**.

A sparkle icon (![Sparkle Icon](https://developer.salesforce.com/media/einsteinfordevs/einstein-sparkle-icon.jpg)) now appears in the editor when Agentforce is working on an autocompletion.

## Receive your First Inline Completions

Agentforce Vibes automatically generates code and suggests completions for you as you type. When writing code, you're often doing things like assigning variable values to an `SObject` such as `Account.name = abc`, or `Account.type = Business` in Apex. Pause the cursor after the variable value and watch Agentforce Vibes suggest a completion and fill out the remaining fields in grayed (ghost) text.

To accept an entire suggestion, press Tab. If you have VS Code's **Inline Suggest** enabled, you can accept the next word of the suggestion using one of these keyboard shortcuts:

| Operating System | Accept Next Word |
| ---------------- | ---------------- |
| macOS            | ⌘→               |
| Windows          | ⌥→               |
| Linux            | ⌥→               |

**note:** If you don't see a suggestion, make sure Auto Completions are enabled. Run **Agentforce: Toggle Auto Completions** to toggle the feature off and on. Also, you can always trigger inline suggestions even if you don't have the Auto Completions enabled using the Option (⌥)\ hotkeys to manually generate autocomplete suggestions.

## Known Issues

- The completions that you receive are sometimes not formatted correctly. Run [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) after you've accepted the suggestions.
- Completions sometime populate piecemeal. Accept the partial suggestion and the remainder will populate.
- Suggested completions from multiple providers will all appear as ghost text if you have multiple AI-based Inline Completion extensions enabled. Scroll through them to find the Agentforce Vibes specific suggestion, or disable competing extensions as described in [setup](https://developer.salesforce.com/docs/platform/salesforcedx-vscode/einsteinfordevs/guides/files/einstein-setup).

Check out our [github repo](https://github.com/forcedotcom/Einstein-GPT-for-Developers/issues) for issues related to the Agentforce Vibes extension.
