美文网首页
VS Code - 在终端中打开项目

VS Code - 在终端中打开项目

作者: Anoyi | 来源:发表于2022-06-14 14:18 被阅读0次

安装 code 命令

使用快捷键 command + shift + P 打开命令面板,输入 >install code 即可安装

在终端中,使用命令 code . 即可打开当前目录到 VS Code:

Oh My Zsh 插件

启用 Oh My Zsh 的 VS Code 插件,只需修改文件 ~/.zshrc,在 plugins 中添加 vscode

plugins=(... vscode)

启用插件后,就可以使用简化命令与 VS Code 交互了,命令如下:

Alias Command Description
vsc code . Open the current folder in VS code
vsca dir code --add dir Add folder(s) to the last active window
vscd file file code --diff file file Compare two files with each other.
vscg file:line[:char] code --goto file:line[:char] Open a file at the path on the specified line and character position.
vscn code --new-window Force to open a new window.
vscr code --reuse-window Force to open a file or folder in the last active window.
vscw code --wait Wait for the files to be closed before returning.
vscu dir code --user-data-dir dir Specifies the directory that user data is kept in. Can be used to open multiple distinct instances of Code.
Alias Command Description
vsced dir code --extensions-dir dir Set the root path for extensions.
vscie id or vsix-path code --install-extension extension-id> or <extension-vsix-path Installs an extension.
vscue id or vsix-path code --uninstall-extension id or vsix-path Uninstalls an extension.
Alias Command Description
vscv code --verbose Print verbose output (implies --wait).
vscl level code --log level Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.
vscde code --disable-extensions Disable all installed extensions.

相关文章

  • VS Code - 在终端中打开项目

    安装 code 命令 使用快捷键 command + shift + P 打开命令面板,输入 >install c...

  • Flutter新建工程

    方法一:终端新建 用VS code打开工程 Git 在VS code的终端下 跳转到工程目录 方法二:VS Cod...

  • shell命令行快速打开vscode项目

    打开vscode,按shift+command+p,输入code,在path中安装code命令。 在终端中访问项目...

  • 在终端中启动vs code打开文件

    在终端中可以输入 $ code .或者 $ code ****.html 打开文件。如果 终端提示 command...

  • 开发工具

    VS Code VS Code简介 《编程工具》 VS Code添加背景图 《编程工具》 VS Code 终端简单...

  • VS Code中创建.NET Core的Web项目并使用Watc

    哎呀,标题有点儿长,羞羞~ 在VS Code中打开集成终端的快捷键:ctrl+` 在终端查看当前所处位置的命令:p...

  • mac 使用code命令打开VSCode

    我们在mac的终端可以使用 open .打开文件夹 如果我们想用vs-code打开文件夹,用的命令是 code ....

  • macos应用

    我们在mac的终端可以使用 open .打开文件夹 如果我们想用vs-code打开文件夹,用的命令是 code ....

  • Macbook命令行打开VSCode

    我们在mac的终端可以使用 open .打开文件夹如果我们想用vs-code打开文件夹,用的命令是 code .,...

  • 今天学了点骚操作

    我们在mac的终端可以使用 open .打开文件夹如果我们想用vs-code打开文件夹,用的命令是 code .,...

网友评论

      本文标题:VS Code - 在终端中打开项目

      本文链接:https://www.haomeiwen.com/subject/kfkzmrtx.html