There a way to swapping instances of only the application VSCode? - visual-studio-code

I'm new to VSCode (Visual Studio Code) and I'm coming from WebStorm.
When I used WebStorm I was able to use Command + ` to swap instances of WebStorm windows. This behavior is also found in Chrome when you use that shortcut to switch between Chrome windows.
Is there a way to do this on VSCode?

Two options using VS Code:
The workbench.action.switchWindow keybinding to select the window to switch to. It is bound to ctrlw by default
The workbench.action.quickSwitchWindow command. Unlike workbench.action.switchWindow, it automatically switches windows when you release the keys. It is not bound by default but you can configure a keybinding for it.
The OS may also provide this:
Mac: cmd`
Windows

Related

Disable (integrated) terminal sharing between VS Code windows

I've liked using VS Code's integrated terminal in my VS Code windows. I usually have several different windows open, each in a different project, and use the terminal to interact with the git repository for the project and the compiler. However, currently (I think this changed in the June 2022 update?) it seems the integrated terminal has started sharing the working dir across VS Code windows, so that if I cd to a particular project/repository in one window, the terminal tab in other windows also change directory.
Assuming this is intentional, is there a way to use the integrated terminal in a way that keeps terminals in separate windows completely independent?

Debugging new VS Code CLI flag in devcontainer

I've forked VSCode on Github to try to add a tiny little feature I think would be useful, which adds a new CLI flag to code, to be used inside the VSCode terminal (like code - for stdin). I added the code, wrote tests, and now I want to try out the feature.
I'm developing inside the built-in devcontainer, so I just launched an instance of VSCode from within VSCode, connected to the devcontainer via VNC and tried to use my flag inside the VSCode-OSS terminal. However, I get an error saying "Command is only available in WSL or inside a Visual Studio Code terminal"
According to server.cli.ts, this means that the env variables VSCODE_IPC_HOOK_CLI and VSCODE_CLIENT_COMMAND aren't set, but I don't know who should be setting them, or if I need to launch VSCode in a different way for debugging.
Has anyone using the VSCode DevContainer to write additional CLI flags and knows how to debug them?

Sending commands prefixed with `Shift`-`Alt` to VSCode's integrated terminal in Windows 11

Is it possible to send keyboard shortcuts prefixed with Shift-Alt to VSCode's integrated terminal in Windows 11?
I'm using Tilish, a nifty tmux plugin that by default uses several shortcuts prefixed with Shift-Alt (e.g. Shift-Alt-q to close a panel). Unfortunately, commands prefixed with Shift-Alt don't seem to get propagated to the terminal.
Ideally I'd prefer all input go to the terminal while my input focus is there.
Thanks!

VS code - 2 split terminal in one (split)

As I'm working with Node.js and Angular, I've currently work with two terminals where I have to switch terminal by the dropdown option.
Is there a way to have two terminals (split) in the same place
like this:
Couldn't find a way.
Update - Visual studio code has this feature starting with version 1.21
Split terminals
The Integrated Terminal can now be split such that multiple are visible at once, which can enable much easier management of terminals when you need a watch and a run command for example:
Open the article to see the GIF demonstration.
Splitting can be done by clicking the split button in the panel, through the context menu or the command Ctrl+Shift + 5.
....
Before VS Code introduced the feature
Inside vs code
You can configure your console to bash or cygwin, and then install and use tmux or screen.
Initial answer before I understood the question intent was to do it inside vs code
Outside vs code
On windows
I'm using Cmder.
It allows opening multiple cmd tabs, and configure more types of command lines / tabs - such as bash, nodejs etc.
On Linux
I got to play a bit with tmux and I heard it's a good option.
Screen shot from google:
On Mac
As Brad stated - tmux works also on Macs, so have a look at the Linux section above.
VSCode has added support to split the integrated terminal in february 2018, as requested by this issue.
At the time it is not yet released, you need to install the Insiders version of VSCode.
You have to set the keybindings yourself, the default are still being discussed here.
As of June 2021, you can select the terminal then enter command: ctrl + shift + 5.

how to navigate among open VS Code open windows on Mac

I recently updated Visual Studio Code to a new version (1.7.2) on my Mac.
I am used to open different 'windows' of VS Code at the same time on different projects.
In previous versions of VS Code I could navigate the VS Code open windows via 'cmd+>' (or 'cmd+z', now I do not remember this exaclty).
Now this key combination does not work anymore and, to navigate windows, I need to open the 'Window' menu option and chose from there.
Does anybody know how to navigate among open VS Code open windows on Mac with this version of VS Code?
Thanks in advance
control+w is working for me
It is showing all active windows
cmd+< is not provided by VSCode, it's a global shortcut of OSX witch works for all applications with multiple windows. You can check if its properly set up in Preferences->Keyboard->Shortcuts
However, there is a command in VSCode to select open windows from a list. Search the command palette for Switch Window, you can bind it to a shortcut yourself, command is called workbench.action.switchWindow.