Skip to content

VS Code Pasting Delay

Problem Statement

Users report significant delays—sometimes multiple seconds—when pasting text into Visual Studio Code. This issue makes editing cumbersome and disrupts workflow efficiency. The problem commonly occurs when:

  • Using VS Code on Windows with WSL (Windows Subsystem for Linux)
  • Working with large files or complex projects
  • Third-party extensions are installed

Affected users often find standard troubleshooting steps (like resetting settings or uninstalling suspected extensions) ineffective. The delay appears to stem from VS Code's background processing during paste operations.

Proven Solutions

The most common cause is VS Code's feature that updates import statements when pasting code. Disable this with:

json
// Add to your VS Code user settings
{
  "typescript.updateImportsOnPaste.enabled": false,
  "javascript.updateImportsOnPaste.enabled": false
}

::: why ⚙️ Why this works VS Code scans your entire project to update import paths when pasting code—a process that slows down significantly in large codebases. Disabling it removes this overhead. :::

2. Disable Paste Format Conversions

If you use remote environments (SSH/WSL), disable format negotiation:

json
{
  "editor.pasteAs.enabled": false
}

ENVIRONMENT-SPECIFIC

This solution primarily helps when using VS Code with remote development environments like WSL or SSH, where clipboard format negotiations cause delays.

3. Find Culprit Extensions with Extension Bisect

Isolate problematic extensions using VS Code's built-in bisect tool:

  1. Open the command palette (Ctrl+Shift+P on Windows/Linux, Cmd+Shift+P on macOS)
  2. Run Help: Start Extension Bisect
  3. After each restart:
    • Paste test content
    • Click This is bad if delay persists
    • Click Good now if pasting works normally
  4. Repeat until the problematic extension is identified

EXTENSION EXAMPLES

Common offenders include:

  • Jupyter extensions
  • Heavy AI assistants (Copilot variants)
  • Language server extensions
  • Clipboard managers

Proactive Prevention

Avoid recurrence with these practices:

  1. Check Clipboard Size: Large clipboard items (particularly images and formatted data) will slow down pasting. Use plain text mode (Ctrl+Shift+V) when possible.
  2. Regularly Update Extensions: Outdated extensions often contain performance bugs.
  3. Monitor VS Code Performance: Use Developer: Show Running Extensions in the command palette to identify resource-intensive tools.

When Solutions Fail

If delays persist:

  1. Update VS Code to the latest version
  2. Try VS Code Insiders Edition
  3. Disable all extensions (Extensions: Disable All Installed Extensions)
  4. Check for known issues in VS Code's GitHub repository

VS Code's paste delays are typically resolvable by adjusting editor behaviors or identifying problematic extensions. Start with the setting changes, then use the bisect method if needed. Most users report significant improvements after implementing these fixes.