如何从终端/命令行调用VS代码编辑器

编程入门 行业动态 更新时间:2024-10-25 16:23:21
本文介绍了如何从终端/命令行调用VS代码编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

问题就说明了一切。

如何从

    $ b $打开VS Code编辑器b
  • windows cmd
  • linux和mac终端
  • windows cmd
  • linux and mac terminal

例如对于记事本++,我写

e.g. for notepad++ I write

>开始notepad ++ test.txt

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

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

您可以从 microsoft

推荐答案

使用命令 code / path / to / file / or / directory / you / want / to / open 以VS Code打开文件。

Use the command code /path/to/file/or/directory/you/want/to/open to open your file in VS Code.

在Windows和Linux上, code 命令应自动安装。在macOS上,需要手动安装:

On Windows and Linux the code command should be installed automatically. On macOS, it needs to be installed manually:

启动VS Code。 现在打开命令面板(F1)并键入 shell命令来找到 Shell命令:在PATH命令中安装'code'命令。 重新启动终端。

Launch VS Code. Now open the Command Palette (F1) and type shell command to find the Shell Command: Install 'code' command in PATH command. Restart your terminal.

更多推荐

如何从终端/命令行调用VS代码编辑器

本文发布于:2023-10-23 00:16:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1519172.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:终端   编辑器   命令行   代码

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!