Using EmEditor as the editor for Claude Code¶
When you press Ctrl+G in Claude Code's interactive mode, it opens Notepad so you can edit your prompt text. You can change the editor that opens on Ctrl+G to EmEditor by following the steps below.
Exit Claude Code.
Make sure EmEditor is in your
PATH. If you used the desktop installer, this should already be set up. If you use the portable version, setPATHas follows:Open the Windows Start menu, search for environment variables, and select Edit environment variables for your account.
In System Properties, click the Environment Variables button.
In the User variables section, select the Path entry and click Edit.
Click New and paste the path to your EmEditor installation folder.
Click OK on each open window to save.
Close and reopen your terminal so the new
PATHtakes effect.
Open the file
%USERPROFILE%\.claude\settings.jsonin EmEditor.Add the
VISUALvariable to theenvsection:
{
"env": {
"VISUAL": "emeditor /sp"
}
}
If the
"env"section already exists, add the line"VISUAL": "emeditor /sp"inside, ensuring the previous line ends with a comma.If there is no
"env"section, add the entire block shown above. If the file already contains other settings, add"env"alongside them, separated by a comma.Save the file.
Run Claude Code. When you press Ctrl+G, EmEditor should open. Typing text into the open document and close EmEditor. The text you typed will appear in the Claude Code input box.
Troubleshooting¶
EmEditor does not open when you press Ctrl+G in Claude Code Open Terminal and run
emeditor. If EmEditor starts,PATHis set correctly. If EmEditor does not start, see step 2.EmEditor does not open on Ctrl+G and
PATHis correct. Change the value ofVISUALto the full path ofemeditor.exe. In JSON, backslashes must be escaped by doubling them. For example:
{
"env": {
"VISUAL": "C:\\path_to\\EmEditor\\EmEditor.exe /sp"
}
}