Skip to main content
Chapter 1 Foundations & Setup

Base Usage & IDE Integration (VS Code, JetBrains, Neovim)

9 min read Lesson 6 / 60 Preview

Base usage and IDE integration

Claude Code can be used in four shapes. Pick the one that matches the work in front of you.

Mode 1 — Terminal-only

cd ~/projects/myapp
claude
> Refactor src/auth/middleware.ts to use the new TokenService.

Best for: server work, quick edits, anything where your hands are already on the terminal.

Mode 2 — IDE companion

Install the official extension:

  • VS Code / Cursor / Windsurf — search "Claude Code" in the marketplace
  • JetBrains (IntelliJ, PHPStorm, WebStorm, RubyMine, etc.) — search "Claude Code" in plugins
  • Neovim — the community plugin claude.nvim works well

The integration adds:

  • A keybind (default Cmd/Ctrl + Esc) to open Claude Code with your current selection as context
  • Live diff preview on file edits
  • Click-to-jump on file paths Claude prints

Best for: most everyday coding work.

Mode 3 — Sidecar

Run Claude Code in a separate terminal window beside your editor. Claude has full filesystem access; the editor stays out of the loop.

Best for: long refactors where Claude is making sweeping changes and you want to review without distraction.

Mode 4 — Headless

claude -p "Add a CHANGELOG entry for the latest commit" --output-format json

Headless mode runs Claude one-shot, prints structured output, and exits. This is the foundation of Ralph loops, scheduled tasks, and CI integrations (covered in chapters 5 and 6).

Setting up the VS Code integration end-to-end

  1. Open VS Code in your project: code .
  2. Install the Claude Code extension.
  3. Press Cmd+Esc (macOS) / Ctrl+Esc (Windows/Linux). Claude Code opens in a panel.
  4. Select code in your editor → press Cmd+Esc again → that selection is added to Claude's context.
  5. Claude's file edits appear as a diff in the editor; accept or reject inline.

JetBrains specific

JetBrains exposes the same chord but routes through the IDE's built-in terminal. If Cmd+Esc conflicts with another binding, change it under Preferences → Keymap → "Open Claude Code".

Neovim specific

-- After installing claude.nvim via lazy.nvim or packer
vim.keymap.set('n', '<leader>cc', '<cmd>ClaudeCode<cr>')
vim.keymap.set('v', '<leader>cc', '<cmd>ClaudeCodeWithSelection<cr>')

Try it

Install the IDE extension that matches your editor, set the keybind to Cmd/Ctrl + Esc, and run a small task end-to-end (rename a variable across three files). Notice how the diff preview changes the trust loop.

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support