Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>ContextCopyNew to Visual Studio Code? Get it now.
ContextCopy

ContextCopy

KristinZhang

|
2 installs
| (0) | Free
Copy selected code with file path and line numbers.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ContextCopy

Copy code snippets with file path and line numbers — ready to paste into ChatGPT, Claude, or any code review.

Features

Copy from Editor

Two commands available via the Command Palette (Cmd+Shift+P):

Copy Code Context — plain format, great for inline references:

// src/utils/parser.ts:42-48

const result = parse(input);

Copy Markdown Context — fenced code block with language, great for AI chats and GitHub:

File: src/utils/parser.ts
Lines: 42-48

```typescript
const result = parse(input);
```

Both commands work with or without a selection — if nothing is selected, the current line is copied.

Copy Multiple Files from Explorer

Right-click any file (or multi-select with Cmd+Click) in the Explorer panel → ContextCopy submenu:

Copy File(s) — plain format, one file per section:

// src/utils/parser.ts

<full file contents>

---

// src/utils/lexer.ts

<full file contents>

Copy File(s) as Markdown — fenced blocks with language tags, ideal for AI context:

File: src/utils/parser.ts

```typescript
<full file contents>
```

---

File: src/utils/lexer.ts

```typescript
<full file contents>
```

Install (from market)

  1. Download from Visual Studio Marketplace or
  2. Download from openvsx

Install (from source)

pnpm install
pnpm run compile

Then press F5 in VS Code to launch the Extension Development Host, or package with vsce package.

Usage

Editor commands:

  1. Open a file, select some code (or place cursor on a line)
  2. Cmd+Shift+P → Copy Code Context or Copy Markdown Context
  3. Paste anywhere

Multi-file copy:

  1. In the Explorer, select files (Cmd+Click for multiple)
  2. Right-click → ContextCopy → Copy File(s) or Copy File(s) as Markdown
  3. Paste into your AI chat

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft