VS Code and JetBrains Integrations
Use Claude Code inside your IDE — keybindings, terminal integration, inline diffs. When the IDE extension beats the terminal and vice versa.
Running Claude Code inside your IDE feels different from the terminal. Inline diffs, file references with a keystroke, plan review before anything executes. For some tasks it's clearly better. For others, the terminal wins. More on that at the end.
The VS Code Extension
Requirements: VS Code 1.98.0+, Anthropic account. Install from Extensions view (search "Claude Code") or Command Palette with Cmd+Shift+P (Ctrl+Shift+P on Windows/Linux).
Once installed, open Claude from the spark icon in the Editor Toolbar, the Activity Bar, the Command Palette, or the Status Bar. They all open the same panel. Pick whatever feels natural.
Permission Modes
Three modes in the prompt box: normal, plan, auto-accept. Normal asks for confirmation on file changes. Plan mode lets Claude propose without executing. Auto-accept skips confirmation.
Default mode lives in claudeCode.initialPermissionMode. Most people start normal, switch to auto-accept once they trust the workflow.
File References with @-mentions
Type @ followed by a file or folder name, fuzzy matching finds it. Way faster than copying paths. This alone justifies the extension for a lot of people.
Alt+K (Option+K on Mac) is the real magic. Highlight a function, press Alt+K, and Claude gets an @-mention with the exact file path and line numbers from your selection. No typing paths. No copy-pasting.
You can also reference terminal output with @terminal:name to pull in recent command results.
Try it
Open a project, highlight a function you want to refactor, press Alt+K, then type "refactor this to use early returns." Watch Claude get the exact file and lines without you typing a single path.
Conversations
Full conversation history via the dropdown. Cmd+N (Ctrl+N on Windows/Linux) for a fresh start.
Open conversations in separate tabs with Cmd+Shift+Esc (Ctrl+Shift+Esc). One tab for a refactor, another for writing tests. Keeps things clean.
Checkpoints
Hover any message to reveal a rewind button. Three options: fork the conversation (branch off from that point), rewind the code (undo file changes to that point), or both together. Same checkpoint system as the CLI, just visual.
Other Settings
Worth tweaking:
selectedModelto pick your modeluseTerminalto run Claude in the terminal panel instead of sidebarautosaveto auto-save files after editsuseCtrlEnterToSendif you want Enter for newlines and Ctrl+Enter to send
There's also a context indicator showing how much of the context window you've used, and a toggle for extended thinking.
The Keybindings
Memorize these. They're the difference between "using the extension" and being fast.
Cmd+Esc (Ctrl+Esc) Toggle focus between editor and Claude
Cmd+Shift+Esc (Ctrl+Shift+Esc) Open Claude in a new tab
Alt+K (Option+K) Insert @-mention with file path and lines
Cmd+N (Ctrl+N) New conversation (when Claude panel is focused)Cmd+Esc is the important one. Write code, Cmd+Esc to Claude, ask a question, Cmd+Esc back to your editor. No mouse.
JetBrains Plugin
IntelliJ, PyCharm, WebStorm, any JetBrains IDE. Plugin on the JetBrains Marketplace, search "Claude Code."
You get interactive diff viewing and selection context sharing. Select code in your editor, it gets passed to Claude as context. Diff viewer shows proposed changes inline.
Fewer features than the VS Code extension, but the core loop works the same way.
CLI Inside VS Code
Worth knowing: you can run the claude CLI directly in VS Code's integrated terminal (Ctrl+backtick). Full CLI feature set, still inside your IDE.
Even better, running Claude Code in an external terminal? The /ide command connects it to VS Code. Your external terminal session triggers inline diffs in the editor.
Conversation history is shared between the extension and the CLI. Start in one, pick up in the other.
CLI vs Extension: When to Use Which
Both work. Different strengths.
Feature CLI VS Code Extension
---------------------------------------------------------
All commands/skills Yes Subset (type / to see)
MCP server config Yes Partial
Checkpoints Yes Yes
! bash shortcut Yes No
Tab completion Yes No
@-mentions No Yes
Inline diff review No Yes
Plan mode toggle Yes Yes (in prompt box)CLI when you need full command access, MCP server configuration, or the ! bash shortcut. CLI also has tab completion for slash commands.
Extension when you want visual diffs, @-mentions, or you're already deep in the editor. The @-mention workflow is especially good for code review and refactoring.
Most people end up using both. CLI for complex multi-step tasks and automation. Extension for quick questions, refactors, anything where seeing inline diffs matters.
Try it
Run claude in the VS Code terminal. Ask it to make a small change. Then open the extension panel and try the same task with an @-mention. Notice how different the diff interaction feels. Pick the one that fits your current task.
Bottom line
- Alt+K is the fastest way to reference code. Learn it first.
- Cmd+Esc to toggle focus. You'll use it constantly.
- CLI has more features. Extension has better visual integration. Use both.
- JetBrains plugin exists. Smaller feature set, same core idea.
/idebridges external terminals to VS Code. Full CLI power with IDE diff review.
Mastering Claude Code
Lesson 6 of 70