Skip to content

Code Completion ​

CodeBuddy IDE provides intelligent code completion as you write code, helping you write code faster and more efficiently.

About Code Completion ​

CodeBuddy provides inline completion while you code. Based on analysis of the current code content and project context, it offers multi-line code completion to help you complete code writing more efficiently.

CodeBuddy supports numerous programming languages and various frameworks, including Python, JavaScript, TypeScript, Java, C/C++, Go, Ruby, and more.

Triggering Code Completion ​

Automatic Trigger ​

Code completion is automatically triggered as you type. When you:

  • Start a new line
  • Type any character
  • Move the cursor to the end of a line

CodeBuddy will analyze your context and generate appropriate completions.

Manual Trigger ​

You can use keyboard shortcuts to manually trigger code completion:

PlatformShortcut
macOSOption + \
Windows/LinuxAlt + \

Accepting Completions ​

When a completion appears, you have several options:

Accept Entire Completion ​

Press the Tab key to accept the complete completion.

Accept Line by Line ​

Accept only the next line of the completion:

PlatformShortcut
macOSCmd + Down
Windows/LinuxCtrl + Down

Accept Word by Word ​

Accept only the next word of the completion:

PlatformShortcut
macOSCmd + Right
Windows/LinuxCtrl + Right

Dismissing Completions ​

To dismiss a completion without accepting it, press the Escape key.

Next Edit Suggestions (NES) ​

Next Edit Suggestions is an advanced feature that predicts your next possible edit operation based on your edit history and context. Unlike traditional inline completion that continues writing from the cursor position, NES can suggest edits at different locations in your code.

How NES Works ​

  • Analyzes your recent edit patterns
  • Predicts what you might want to edit next
  • Displays suggestions that may span multiple lines or affect different parts of the code

Manually Triggering NES ​

PlatformShortcut
All platformsCtrl + Shift + Enter

Accepting NES Suggestions ​

When an NES suggestion appears, press the Tab key to accept. Press the Escape key to dismiss.

Enabling/Disabling NES ​

NES is enabled by default. To toggle it:

  1. Open the command palette (Cmd/Ctrl + Shift + P)
  2. Search for "CodeBuddy: Quick Settings"
  3. Toggle "Next Edit Suggestions"

Or configure in settings:

  1. Open settings (Cmd/Ctrl + ,)
  2. Search for codingcopilot.enableNextEditSuggestions
  3. Toggle the setting

Switching Completion Models ​

You can switch between different AI models for code completion:

  1. Open the command palette (Cmd/Ctrl + Shift + P)
  2. Search for "CodeBuddy: Change Completions Model"
  3. Select the model you want to use

Or access via quick settings:

  1. Click the CodeBuddy icon in the status bar
  2. Select "Change Completions Model"

Configuring Code Completion ​

Globally Enabling/Disabling Auto Completion ​

  1. Open settings (Cmd/Ctrl + ,)
  2. Search for codingcopilot.enableAutoCompletions
  3. Toggle the setting

Or use quick settings:

  1. Open the command palette (Cmd/Ctrl + Shift + P)
  2. Search for "CodeBuddy: Quick Settings"
  3. Toggle "Auto Completions"

Enabling/Disabling for Specific Languages ​

You can control code completion for specific programming languages:

  1. Open settings (Cmd/Ctrl + ,)
  2. Search for codingcopilot.enableCompletionLanguage
  3. Configure settings for specific languages

Example configuration in settings.json:

json
{
  "codingcopilot.enableCompletionLanguage": {
    "python": true,
    "javascript": true,
    "markdown": false,
    "plaintext": false
  }
}

You can also toggle completion for the current file's language via quick settings.

Generation Preference ​

Control the style of code completions:

  1. Open settings (Cmd/Ctrl + ,)
  2. Search for codingcopilot.generationPreference
  3. Choose:
    • Smart Mode: Provides multi-line completions based on context
    • Single Line Mode: Limits completions to a single line

IDE Settings Configuration ​

You can also configure code completion through the IDE settings panel:

  1. Click the CodeBuddy icon in the sidebar or status bar
  2. Open Settings
  3. Navigate to the Tab section

The Tab settings page provides:

  • Auto Completion: Toggle switch to enable/disable real-time code completion
  • Language Rules: Configure whether auto-completion is enabled for each language. Language-level rules override global settingsβ€”even when Auto Completion is off, languages explicitly enabled here will still provide completions
  • Generation Preference: Choose between smart mode (context-based multi-line completions) or single line mode

Keyboard Shortcut Reference ​

ActionmacOSWindows/Linux
Trigger completionOption + \Alt + \
Accept allTabTab
Accept lineCmd + DownCtrl + Down
Accept wordCmd + RightCtrl + Right
DismissEscapeEscape
Trigger NESCtrl + Shift + EnterCtrl + Shift + Enter