documents/dev/vscode.md

VS Code

Tasks (.vscode/tasks.json)

  • Task label: echo (default build task)
  • Command: git add .; git commit -m save; git push
  • Run it:
    • ⌘ Shift B (runs the default build task) - or ⌘ Shift P -> Tasks: Run Task -> echo
  • Set or change the hotkey:
    • Open Keyboard Shortcuts: ⌘ K then ⌘ S
    • Search for Tasks: Run Build Task to map a key for the default task (echo)
    • Or bind directly to this task in keybindings.json:
{
  "key": "cmd+alt+g",
  "command": "workbench.action.tasks.runTask",
  "args": "echo"
}
  • Note: this task stages all files and pushes immediately, so only run it when intended.