简体   繁体   中英

VSCode Win Shortcut to Launch with Open Folder Command

I have 10 applications that I constantly work on. At times I need to open them all up separately to run bash commands on them. Is there a way I can create a windows shortcut for each folder, then I select all 10 shortcuts and click enter to initiate 10 different VSCode applications each opens up with their respective folder I set to?

(Windows 10) To open VS Code in desired directory using shortcut:

  • Create shortcut to Visual Code Studio app,
  • Right click on the shortcut and select Properties ,
  • In Target field append your directory path (remember to use quotes " " if there are spaces in the path).

截屏

I use a batch file like in Sean's solution. You can automatically close the terminal after launch if you use the start command rather than "code."

Here's an example:

@echo off
cd "C:\path\to\your\project\folder\"
start "" "C:\Program Files\Microsoft VS Code\Code.exe" .
exit

Note: if you don's like how the batch file looks, you can make a shortcut to the batch file and change the shortcut's icon to the VS Code icon.

ctr + K + O open a folder vs code most common shortcut key available all platforms same 在此处输入图像描述

https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf

In a similar situation, I use a batch file to launch my most used vscode windows. I am not yet smart enough to make the cmd windows disappear after they open vscode, but maybe someday. In each batch file, use the following changing the directory for each project.

@ECHO OFF
cd C:\directory\where\your\project\is
code .
exit

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM