To combine the power of Claude Code and IDEs, you'll need the VS Code extension. Once it is installed, the chat panel understands which files you have open, what you have selected, and the diff it should propose back to you. This lesson is the baseline setup that unlocks every workflow that follows.
Cmd+Shift+X
to open the Extensions view.Claude Code
and install the official Anthropic extension.If you are in Cursor the extension ships preinstalled—still open the Extensions view to confirm it is enabled and updated.
Cmd+Escape
opens the panel. Prefer the built-in terminal? Run claude
from an editor terminal./ide
in the Claude terminal to re-establish context streaming.@ In FILENAME
or @ N lines selected
before you send a request.Prompts:
Explain what this selected function does and list any obvious tests.
Refactor this component to use a custom hook. Keep behavior identical.
Terminal:
claude
/ide
[00:00] Using VS Code or one of the variants like Cursor, hit command shift P, search for install extensions, and then search for Clod, and you'll see Clod code for VS Code has an extension. Go ahead and click install. I've already installed it, and then once that's installed we'll go ahead and check out the keyboard shortcuts with command shift P. We'll search for shortcuts, open the menu, search for Clod here, and you can see we have a couple of main shortcuts, one for running the extension and one for insert at mentioned. We'll start with command escape for running the extension, And you'll see this is essentially the same as starting a new terminal in editor area to the side, and then running Clod.
[00:38] Now because this offers a bit more flexibility with the ways that you launch Clod, I will definitely be using the terminal more. And as a note, if you ever get this message that the IDE is disconnected. If you type slash IDE you can select the IDE to reconnect and you'll see now this one is disconnected. So I'm going to close out Cloud Code, terminate the process, then reconnect over here, And then I'm going to add a keyboard shortcut for create new terminal in editor area to the side. So create new terminal, and it looks like it'll be this one right here.
[01:09] We'll click add key binding. I'll use command T. The existing commands aren't too important to me, and this input does have search history, so I'll press up and go back to create new terminal. So again command-T, hit enter, and now at any point I can hit command-T and open a new terminal to the side. I can type in clod or clod with any of the settings because the extension version of this doesn't allow you to pass in any settings.
[01:31] So with the IDE connected, represented by this little blue circle, anytime we have a file I'll go ahead and create a readme. I'll go ahead and press command-p, type readme.md, down to create a new file with that path. I'll just type in hello world, and you'll see as soon as this has content that in readme shows up. So with readme in context, any command I give will assume that that's where I want to make the change. So if I say please translate to French, hit enter, you'll see it assumes readme is the proper context, and then because we have the extension installed and we're connected to the IDE, we also get a nice diff that appears any time this dialogue of asking us to accept changes appears.
[02:11] So we'll go ahead and allow this change. The diff disappears and now the readme is updated based on our current session. Then in the file if I create another line I'll say hello world again. I can also select this line and you'll see one line selected here. So if I say translate to Spanish, let this run, now you'll see it's only impacting that individual line.
[02:30] We're getting the diff again and it's only operating on the selection and using that as the main context. So I hit enter to allow the change and then if I create another file we'll call this one license.md, create the file, and I'll just dictate Please use however you want. You'll see that we're now in license MD, but if we want to modify multiple files we can hit this shortcut of command option K. We'll go back to Clod and you'll see it here. Insert at mentioned.
[02:58] So if I go to my license, I'll hit command option K. That'll insert the entire license file. If I select a line here I can command-option-k and insert only the selected line. So if I add a few more lines, hello world, go back to my license, hello world, I'm going to delete this reference, and then select this line with command-option-K. We now have line 3 on license and line 3 on the readme selected.
[03:24] So if I say translate to Italian, you can see it brings those lines into context, and it looks like it's trying to modify line 5. I must have not been explicit enough since so far we've been translating English words, and we had the entire file in context previously. So I'm going to say no, tell Cloud what to do differently by hitting escape, and say please only translate the selected lines. So we'll run this back, and you can see this time it's translating line 3, so we'll accept this, and then it swaps over to the license. We get the nice diff.
[03:53] I'll accept this, and then our selected changes are done.