5

mac 命令行使用 vscode 打开当前目录

 6 months ago
source link: https://blog.kelu.org/tech/2023/12/14/mac-vscode-open-by-terminal.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

mac 命令行使用 vscode 打开当前目录

2023-12-14     tech mac vscode
vscode.jpg
  1. 安装命令行工具: 打开 VSCode,然后按 Cmd + Shift + P 打开命令面板,输入 “shell command” 并选择 “Shell Command: Install ‘code’ command in PATH”。这将会在命令行中添加 code 命令。

    image-20231214171531639
    image-20231214171543081
  2. 使用 code 命令打开目录: 在目标目录中,运行以下命令:

    bashCopy code
    code .
    
    image-20231214171614210

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK