Skip to content

Autocomplete

The autocomplete feature provides intelligent code suggestions and completions as you type, helping you write code faster and more efficiently. It offers both automatic and manual triggering options.

How Autocomplete Works

This feature intelligently analyzes context while you code and provides the following support:

  • Quick fixes for common code patterns
  • Context-aware suggestions based on surrounding code
  • Multi-line completions for complex code structures

It leverages your selected AI provider to generate smart suggestions that align with your coding style and project context.

Triggering Options

Pause-to-Complete

When enabled, VJSP automatically triggers autocomplete when you pause typing. This delivers a seamless coding experience, naturally offering suggestions as you work.

  • Auto-trigger delay: Configure the delay (in seconds) after you stop typing before autocomplete is triggered
  • Defaults to 3 seconds, but can be adjusted higher or lower
  • A shorter delay means faster suggestions but may consume more resources

Manual Autocomplete Trigger (Cmd+L)

When you want to actively request intelligent suggestions at a specific moment, use manual autocomplete:

  1. Place your cursor at the code location where you need help;
  2. Press Cmd+L (macOS) or Ctrl+L (Windows / UOS);
  3. VJSP immediately analyzes the current context;
  4. Receive an instant improvement or completion suggestion.

This is especially useful for:

  • Quick fixes
  • Code completion
  • Refactoring suggestions

You can customize the keyboard shortcut in your IDE’s keymap settings.

Disable Autocomplete from Other Plugins

We recommend disabling autocomplete features from other plugins to optimize your VJSP experience.

Best Practices

  1. Balance speed and quality: Faster models respond quickly but may be less accurate; choose based on task requirements.
  2. Adjust trigger delay: Set an appropriate delay to maintain responsiveness while avoiding unnecessary API calls.
  3. Use Quick Task for complex changes: This feature is designed specifically for substantial code modifications.
  4. Manually trigger autocomplete for precision: When you need exact control over suggestion timing, manual invocation improves accuracy.

Tips

  • Autocomplete works best with well-structured, organized code
  • Comments above functions help autocomplete understand your intent
  • Variable and function names matter—descriptive names lead to better suggestions

Code Actions – Context menu options for common coding tasks