安装包含本地参考和全部已发布模式的完整包。
install codecode通常根据扩展名识别语法;可用 -l <lang> 或 -<lang> 手动指定。-n 仅在父目录已存在时创建缺失文件,不会清空已有文件。
code <file> [-n] [-l <lang>|-<lang>]code <file>在代码编辑器中打开文件
-n打开前创建缺失文件
-l <lang> | -<lang>选择 php、html、xml、css、js、json、ini、md、py、sql、sh 或 lil 高亮
include -code -i @include查看自动管理的编辑器界面包
include -code -u @include保留
help hotkeys显示编辑器快捷键
通常根据扩展名识别语法;可用 -l <lang> 或 -<lang> 手动指定。-n 仅在父目录已存在时创建缺失文件,不会清空已有文件。
可直接在页面中运行预先准备的示例。结果已预先生成并在浏览器中显示;服务器不会执行任何终端命令。
安装当前兼容版本。完整功能请选择 Base,精简包请选择 Minimum;已安装模块的更新请使用 upgrade。
Base 与 Minimum 是同一当前模块版本的两个包。
安装包含本地参考和全部已发布模式的完整包。
install code安装精简包。该包不包含本地参考;
install code -m安装这个确切的已发布版本。
install code -v 1.3.7让 upgrade 检查兼容性,仅在需要时替换已安装块。
upgrade code删除扩展块,不影响核心和其他模块。
install code -u示例可复制,但网站不会执行。请先检查路径、权限和破坏性选项。
cd \sandbox | code src/Calculator.php[Browser editor: existing PHP source]
<?php
declare(strict_types=1);
final class Calculator
{
public static function add(int $left, int $right): intcode \sandbox\tmp\review.js -n[Browser editor: new empty file]
sandbox/tmp/review.js
Language: jscode \sandbox\config\app.json -json[Browser editor: existing file]
sandbox/config/app.json
Language: json (selected)code \sandbox\scripts\demo.lil -l lil[Browser editor: existing file]
sandbox/scripts/demo.lil
Language: lil (selected)code \sandbox\config\.env.example -ini[Browser editor: existing file]
sandbox/config/.env.example
Language: ini (selected)code \sandbox\data\sample.txt -l text[Browser editor: existing file]
lil-terminal sandbox text file
This file is safe to read, copy, rename, replace, hash and archive.include -code -iPackage code
Components CSS + JavaScript
Status available separately from code这些命令安装可选的编辑器资源。即使没有这些资源,
include -code -uPackage code
CSS/JS removed when present
Command still installed这些命令安装可选的编辑器资源。即使没有这些资源,
help hotkeyshotkeys
Keyboard shortcuts are listed for the installed interfacecode \sandbox\missing.php未找到文件code \sandbox\data\sample.txt -l unsupported不支持该语言sandbox/src/Calculator.php该示例使用受保护的 /sandbox/ 文档工作区中的文件或目录。
<?php
declare(strict_types=1);
final class Calculator
{
public static function add(int $left, int $right): int
{
return $left + $right;
}
}