VSCode 編輯器

快捷鍵

打开快捷键设置:首选项 → 键盘快捷方式 或者 ⌘ K ⌘ S

文本編輯

  • 往上插入空行:⌘ + ⇧ + ⏎
  • 往下插入一行:⌘ + ⏎
  • 刪除一行:^ + ⇧ + L
  • 选中行:⇧ + ↑/下
  • 註釋文本:⌘ + ⇧ + F7 (黑鍵盤) || ⌘ + Fn + ↑ (白鍵盤)
  • 向上另起一行:⌘ + ⇧ + ⏎ / 向下另起一行:⌘ + ⏎ windows Ctr + ⏎ 往上 Ctr + Shift + ⏎
  • 转到上一编辑位置:⌘ Q ⌘ Q
  • 删除行 ^ + ⇧ + L
  • 删除左侧 ^ + ⇧ + Backspace
  • 删除右侧 ^ + ⇧ + Delete

執行命令

  • 清除控制台:⌘ + K

调试器

launch.json 文件

{
  // 使用 IntelliSense 了解相关属性。 
  // 悬停以查看现有属性的描述。
  // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Debug",
      "skipFiles": [
        "<node_internals>/**"
      ],
      "program": "${workspaceFolder}/src/console.ts", 
      "runtimeArgs": ["-r", "ts-node/register", "-r", "tsconfig-paths/register"],
      "console": "integratedTerminal",
      "outFiles": [
        "${workspaceFolder}/**/*.js"
      ]
    },
    {
      "name": "Mocha",
      "type": "node",
      "request": "launch",
      "program": "${workspaceFolder}/Test/timeparse.spec.ts",
      "runtimeArgs": [
        "${workspaceRoot}/node_modules/mocha/bin/_mocha",
        "--no-timeouts",
        "-r",
        "ts-node/register"
      ],
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen",
      "port": 9229
    }
  ]
}

插件

Live Server: 可以作为服务器运行index.html。(鼠标右键弹出菜单:open in live server)

工具/编辑/vscode.txt · 最后更改: 2024-09-03 02:31 由 goldentianya
回到顶部
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0