Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>XsnipNew to Visual Studio Code? Get it now.
Xsnip

Xsnip

Xsnip

| (0) | Free
Search and insert code snippets from Xsnip
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Xsnip VS Code Extension

Search, insert, and submit code snippets from Xsnip directly in VS Code.

Features

  • Search Snippets: Quickly find code snippets from your Xsnip library.
  • Insert at Cursor: Inject snippet code directly into your active editor.
  • Save to File: Save a snippet as a new file in your project.
  • Submit Snippets: Create new snippets from your current selection or entire file.

Usage

Searching & Using Snippets

  1. Open the search palette:
    • Mac: Cmd+Shift+X
    • Windows/Linux: Ctrl+Shift+X
    • Or run command: Xsnip: Search Snippets...
  2. Type your query to filter results.
  3. Select a snippet and choose an action:
    • Insert at Cursor: Pastes code at your current cursor position.
    • Save to New File: Creates a new file with the snippet content.

Submitting Snippets

  1. Select the code you want to save (or select nothing to save the whole file).
  2. Right-click and choose:
    • Xsnip: Submit Selection
    • Xsnip: Submit File
  3. (Alternatively) Use the Command Palette (Cmd+Shift+P) to run these commands.

Note: You need an API Key to submit snippets.

Configuration

Configure the extension in VS Code Settings (Cmd+, -> Extensions -> Xsnip).

Setting Default Description
xsnip.apiKey "" Required for submissions. Generate this in your Xsnip Account settings.
xsnip.baseUrl https://xsnip.dev URL of the Xsnip server.
xsnip.insertHeader true Add a header comment when inserting code.
xsnip.headerFormat // Source: {title} (xsnip:{id}) Template for the header comment. Variables: {title}, {id}, {date}.

Commands

Command Keybinding Description
Xsnip: Search Snippets... Cmd+Shift+X Open search palette.
Xsnip: Insert at Cursor - Insert currently selected snippet.
Xsnip: Save to New File - Save currently selected snippet to file.
Xsnip: Submit Selection - Upload selected text as a new snippet.
Xsnip: Submit File - Upload current file as a new snippet.

Development

To run this extension locally:

  1. Clone the repository.
  2. Install dependencies:
    cd vscode
    npm install
    
  3. Run the extension: Press F5 in VS Code to launch the Extension Development Host.

Requirements

  • VS Code 1.85.0 or newer
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft