How to get new VS Code windows to have text input focus?
2
votes
2
answers
76
views
I am using Visual Studio Code on my macbook. When I launch a new instance of VS Code when I already have 1 instance up, via
code
using iTerm, the *already running* instance is the one that has text input focus. This means when the new VS Code instance pops up, I can't immediately start typing in it; I have to click it with my mouse first, *then* I can type.
What I want is for the new instance of VS Code to have text input focus. Is this a MacOS specific setting, something I need to configure in VS Code, or an adjustment in how I launch VS Code from the command line?
Some contextual information:
- MacOS Version: 15.3.1
- In "Desktop & Dock" settings for Mission Control, I have "Automatically rearrange Spaces based on most recent use" disabled, and "Displays have separate spaces" enabled.
- I have 2 external monitors connected and am also using the macbook display (for 3 total).
- The current instance of VS Code is on my middle display, and the new instance pops up on my right display.
- For testing I'm running code
directly in iTerm, but the real use case is when VS Code is launched from git, such as when I do git commit
, because I have Code set up as my git editor with setting core.editor
set to code --wait --new-window
.
Asked by void.pointer
(121 rep)
Feb 17, 2025, 06:43 PM
Last activity: Jun 23, 2025, 10:30 PM
Last activity: Jun 23, 2025, 10:30 PM