如何从终端/命令行调用 VS Code 编辑器 [英] How to call VS Code Editor from terminal / command line

查看:39
本文介绍了如何从终端/命令行调用 VS Code 编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题说明了一切.

如何打开 VS Code 编辑器

How can I open VS Code editor from

  • windows cmd
  • linux 和 mac 终端

例如对于记事本++我写

e.g. for notepad++ I write

<代码>>启动记事本++ test.txt

顺便说一句,编辑器很棒(跨平台)!谢谢纳德拉!

By the way, the editor is awesome (cross-platform)! Thank you Nadella!

您可以从 microsoft

推荐答案

要打开文件或目录,请使用以下命令:

To open a file or directory use the command:

code /path/to/file/or/directory/you/want/to/open

ma​​cOS 用户,需要手动安装:

  1. 启动 VS Code.
  2. Command + Shift + P 打开命令面板.
  3. 输入shell command,找到Shell Command: Install 'code' command in PATH并选择安装.
  4. 重启你的终端.
  1. Launch VS Code.
  2. Command + Shift + P to open the Command Palette.
  3. Type shell command, to find the Shell Command: Install 'code' command in PATH and select to install it.
  4. Restart your terminal.

这篇关于如何从终端/命令行调用 VS Code 编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆