From b9c85f2a6b077b79d8e81145dd116ee44e130b0d Mon Sep 17 00:00:00 2001 From: nycki Date: Mon, 28 Jul 2025 15:32:05 -0700 Subject: [PATCH] vscode config: quickly insert datetime --- .vscode/keybindings.json | 8 ++++++++ .vscode/markdown.code-snippets | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .vscode/keybindings.json create mode 100644 .vscode/markdown.code-snippets diff --git a/.vscode/keybindings.json b/.vscode/keybindings.json new file mode 100644 index 0000000..92dd771 --- /dev/null +++ b/.vscode/keybindings.json @@ -0,0 +1,8 @@ +// copy these into your global keybinds +[ + { + "key": "ctrl+d", + "command": "editor.action.insertSnippet", + "args": { "name": "insert date" } + } +] \ No newline at end of file diff --git a/.vscode/markdown.code-snippets b/.vscode/markdown.code-snippets new file mode 100644 index 0000000..871d864 --- /dev/null +++ b/.vscode/markdown.code-snippets @@ -0,0 +1,23 @@ +{ + // Place your Memo workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and + // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope + // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is + // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. + // Placeholders with the same ids are connected. + // Example: + // "Print to console": { + // "scope": "javascript,typescript", + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "insert date": { + "body": [ + "$CURRENT_YEAR-$CURRENT_MONTH-${CURRENT_DATE} $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND" + ] + } +}