Skip to content

Instantly share code, notes, and snippets.

@ThorstenHans
Last active August 17, 2020 19:14
Show Gist options
  • Save ThorstenHans/18090a7601fd559ab12ad3f00dfc450b to your computer and use it in GitHub Desktop.
Save ThorstenHans/18090a7601fd559ab12ad3f00dfc450b to your computer and use it in GitHub Desktop.
VSCode Settings
{"lastUpload":"2020-08-17T19:14:19.084Z","extensionVersion":"v3.4.3"}
[
{
"metadata": {
"id": "214cbfb9-7c06-4467-bad4-357ae83eb587",
"publisherId": "johnpapa.Angular2",
"publisherDisplayName": "johnpapa"
},
"name": "Angular2",
"publisher": "johnpapa",
"version": "8.2.0"
},
{
"metadata": {
"id": "819a23e1-b6c6-41cf-9029-e653b537d996",
"publisherId": "ms-vscode.azure-account",
"publisherDisplayName": "ms-vscode"
},
"name": "azure-account",
"publisher": "ms-vscode",
"version": "0.8.7"
},
{
"metadata": {
"id": "5dcca53c-1485-4cdc-a643-4a366d2ac9e0",
"publisherId": "ms-vscode.azurecli",
"publisherDisplayName": "ms-vscode"
},
"name": "azurecli",
"publisher": "ms-vscode",
"version": "0.4.6"
},
{
"metadata": {
"id": "7a0110bb-231a-4598-aa1b-0769ea46d28b",
"publisherId": "aaron-bond.better-comments",
"publisherDisplayName": "aaron-bond"
},
"name": "better-comments",
"publisher": "aaron-bond",
"version": "2.0.5"
},
{
"metadata": {
"id": "e337c67b-55c2-4fef-8949-eb260e7fb7fd",
"publisherId": "Shan.code-settings-sync",
"publisherDisplayName": "Shan"
},
"name": "code-settings-sync",
"publisher": "Shan",
"version": "3.4.3"
},
{
"metadata": {
"id": "d0bfc4ab-1d3a-4487-8782-7cf6027b4fff",
"publisherId": "ms-vscode.csharp",
"publisherDisplayName": "ms-vscode"
},
"name": "csharp",
"publisher": "ms-vscode",
"version": "1.21.8"
},
{
"metadata": {
"id": "eb7755c6-c13a-480e-b3d2-a054b29774b0",
"publisherId": "Leopotam.csharpfixformat",
"publisherDisplayName": "Leopotam"
},
"name": "csharpfixformat",
"publisher": "Leopotam",
"version": "0.0.84"
},
{
"metadata": {
"id": "f60a60a6-95ba-42d4-b41c-3d24c1b89588",
"publisherId": "EditorConfig.EditorConfig",
"publisherDisplayName": "EditorConfig"
},
"name": "EditorConfig",
"publisher": "EditorConfig",
"version": "0.14.2"
},
{
"metadata": {
"id": "04441faa-52b5-4583-b6ed-f9e56f613819",
"publisherId": "ginfuru.ginfuru-vscode-jekyll-syntax",
"publisherDisplayName": "ginfuru"
},
"name": "ginfuru-vscode-jekyll-syntax",
"publisher": "ginfuru",
"version": "0.1.0"
},
{
"metadata": {
"id": "4de763bd-505d-4978-9575-2b7696ecf94e",
"publisherId": "eamodio.gitlens",
"publisherDisplayName": "eamodio"
},
"name": "gitlens",
"publisher": "eamodio",
"version": "10.2.0"
},
{
"metadata": {
"id": "d6f6cfea-4b6f-41f4-b571-6ad2ab7918da",
"publisherId": "golang.go",
"publisherDisplayName": "golang"
},
"name": "go",
"publisher": "golang",
"version": "0.15.2"
},
{
"metadata": {
"id": "aae00486-7e92-42b3-91b0-2b419e4f3875",
"publisherId": "vincaslt.highlight-matching-tag",
"publisherDisplayName": "vincaslt"
},
"name": "highlight-matching-tag",
"publisher": "vincaslt",
"version": "0.9.5"
},
{
"metadata": {
"id": "0c2f7bfc-650b-4b67-8844-d699dd6e44f6",
"publisherId": "wmaurer.join-lines",
"publisherDisplayName": "wmaurer"
},
"name": "join-lines",
"publisher": "wmaurer",
"version": "0.2.2"
},
{
"metadata": {
"id": "98790d67-10fa-497c-9113-f6c7489207b2",
"publisherId": "yzhang.markdown-all-in-one",
"publisherDisplayName": "yzhang"
},
"name": "markdown-all-in-one",
"publisher": "yzhang",
"version": "2.5.1"
},
{
"metadata": {
"id": "51cb7751-0f7a-43e5-8018-d57d64487f8c",
"publisherId": "openhab.openhab",
"publisherDisplayName": "openhab"
},
"name": "openhab",
"publisher": "openhab",
"version": "0.7.0"
},
{
"metadata": {
"id": "880475da-a140-4fc5-a99f-6d1210d88559",
"publisherId": "ms-vscode.powershell-preview",
"publisherDisplayName": "ms-vscode"
},
"name": "powershell-preview",
"publisher": "ms-vscode",
"version": "2020.4.3"
},
{
"metadata": {
"id": "96fa4707-6983-4489-b7c5-d5ffdfdcce90",
"publisherId": "esbenp.prettier-vscode",
"publisherDisplayName": "esbenp"
},
"name": "prettier-vscode",
"publisher": "esbenp",
"version": "5.1.3"
},
{
"metadata": {
"id": "93ce222b-5f6f-49b7-9ab1-a0463c6238df",
"publisherId": "ms-vscode-remote.remote-containers",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "remote-containers",
"publisher": "ms-vscode-remote",
"version": "0.94.0"
},
{
"metadata": {
"id": "607fd052-be03-4363-b657-2bd62b83d28a",
"publisherId": "ms-vscode-remote.remote-ssh",
"publisherDisplayName": "ms-vscode-remote"
},
"name": "remote-ssh",
"publisher": "ms-vscode-remote",
"version": "0.48.0"
},
{
"metadata": {
"id": "4a23294b-fd16-4c51-9759-da9936474cf8",
"publisherId": "mauve.terraform",
"publisherDisplayName": "mauve"
},
"name": "terraform",
"publisher": "mauve",
"version": "1.4.0"
},
{
"metadata": {
"id": "fb374ce1-5343-46c8-a425-900fdad15523",
"publisherId": "wesbos.theme-cobalt2",
"publisherDisplayName": "wesbos"
},
"name": "theme-cobalt2",
"publisher": "wesbos",
"version": "2.1.6"
},
{
"metadata": {
"id": "42691ca6-18d6-4efe-9e9a-1aabad399d4b",
"publisherId": "ms-azuretools.vscode-azureappservice",
"publisherDisplayName": "ms-azuretools"
},
"name": "vscode-azureappservice",
"publisher": "ms-azuretools",
"version": "0.16.1"
},
{
"metadata": {
"id": "2ed5adbe-c4e1-4227-8e41-31e2095b30e3",
"publisherId": "ms-azuretools.vscode-azurefunctions",
"publisherDisplayName": "ms-azuretools"
},
"name": "vscode-azurefunctions",
"publisher": "ms-azuretools",
"version": "0.20.0"
},
{
"metadata": {
"id": "2a1fdf76-30a9-4155-94f1-73462a7cee3f",
"publisherId": "ms-azuretools.vscode-azurestorage",
"publisherDisplayName": "ms-azuretools"
},
"name": "vscode-azurestorage",
"publisher": "ms-azuretools",
"version": "0.7.2"
},
{
"metadata": {
"id": "ced8803c-a22e-475e-8b23-d2f6eb5baa3e",
"publisherId": "ms-azuretools.vscode-azureterraform",
"publisherDisplayName": "ms-azuretools"
},
"name": "vscode-azureterraform",
"publisher": "ms-azuretools",
"version": "0.3.0"
},
{
"metadata": {
"id": "951e1945-25a8-4ea0-aa11-076ac75b098d",
"publisherId": "ms-azuretools.vscode-cosmosdb",
"publisherDisplayName": "ms-azuretools"
},
"name": "vscode-cosmosdb",
"publisher": "ms-azuretools",
"version": "0.11.0"
},
{
"metadata": {
"id": "0479fc1c-3d67-49f9-b087-fb9069afe48f",
"publisherId": "ms-azuretools.vscode-docker",
"publisherDisplayName": "ms-azuretools"
},
"name": "vscode-docker",
"publisher": "ms-azuretools",
"version": "0.8.2"
},
{
"metadata": {
"id": "583b2b34-2c1e-4634-8c0b-0b82e283ea3a",
"publisherId": "dbaeumer.vscode-eslint",
"publisherDisplayName": "dbaeumer"
},
"name": "vscode-eslint",
"publisher": "dbaeumer",
"version": "1.9.1"
},
{
"metadata": {
"id": "c0c04a3d-f3cd-44ce-a9dd-61ad33504bc7",
"publisherId": "piotrpalarz.vscode-gitignore-generator",
"publisherDisplayName": "piotrpalarz"
},
"name": "vscode-gitignore-generator",
"publisher": "piotrpalarz",
"version": "1.0.2"
},
{
"metadata": {
"id": "9ccc1dd7-7ec4-4a46-bd4f-7d7b8b9d322a",
"publisherId": "vscode-icons-team.vscode-icons",
"publisherDisplayName": "vscode-icons-team"
},
"name": "vscode-icons",
"publisher": "vscode-icons-team",
"version": "9.6.0"
},
{
"metadata": {
"id": "4837e4f3-1b01-4732-b1a6-daa57ef64cab",
"publisherId": "ms-kubernetes-tools.vscode-kubernetes-tools",
"publisherDisplayName": "ms-kubernetes-tools"
},
"name": "vscode-kubernetes-tools",
"publisher": "ms-kubernetes-tools",
"version": "1.2.1"
},
{
"metadata": {
"id": "daf8b44d-8aae-4da2-80c5-1f770219f643",
"publisherId": "DavidAnson.vscode-markdownlint",
"publisherDisplayName": "DavidAnson"
},
"name": "vscode-markdownlint",
"publisher": "DavidAnson",
"version": "0.32.0"
},
{
"metadata": {
"id": "5a7017bf-c571-4d77-b902-6e56b16f539a",
"publisherId": "johnpapa.vscode-peacock",
"publisherDisplayName": "johnpapa"
},
"name": "vscode-peacock",
"publisher": "johnpapa",
"version": "3.2.0"
},
{
"metadata": {
"id": "2061917f-f76a-458a-8da9-f162de22b97e",
"publisherId": "redhat.vscode-yaml",
"publisherDisplayName": "redhat"
},
"name": "vscode-yaml",
"publisher": "redhat",
"version": "0.6.1"
},
{
"metadata": {
"id": "0b94edb3-44e3-49a3-aed9-04b5d8510385",
"publisherId": "ms-vsonline.vsonline",
"publisherDisplayName": "ms-vsonline"
},
"name": "vsonline",
"publisher": "ms-vsonline",
"version": "1.0.1287"
}
]
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "alt+tab",
"command": "workbench.action.quickSwitchWindow"
},
{
"key": "cmd+1",
"command": "workbench.view.explorer"
},
{
"key": "shift+cmd+e",
"command": "-workbench.view.explorer"
},
{
"key": "alt+enter",
"command": "-debug.openBreakpointToSide",
"when": "breakpointsFocused"
},
{
"key": "alt+enter",
"command": "-editor.action.selectAllMatches",
"when": "editorFocus && findWidgetVisible"
},
{
"key": "alt+enter",
"command": "editor.action.quickFix",
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
},
{
"key": "cmd+.",
"command": "-editor.action.quickFix",
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+`",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
}
]
{
"files.autoSave": "onWindowChange",
"workbench.colorTheme": "SynthWave '84",
"window.zoomLevel": 2,
"workbench.startupEditor": "none",
"explorer.openEditors.visible": 0,
"workbench.tree.indent": 20,
"workbench.iconTheme": "vscode-icons",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"vs-kubernetes": {
"vs-kubernetes.minikube-path": "/Users/th/.vs-kubernetes/tools/minikube/darwin-amd64/minikube"
},
"sync.autoDownload": true,
"sync.autoUpload": true,
"sync.gist": "18090a7601fd559ab12ad3f00dfc450b",
"sync.forceUpload": true,
"editor.hover.delay": 150,
"editor.wordWrapColumn": 120,
"editor.fontFamily": "Dank Mono",
"editor.fontLigatures": true,
"editor.quickSuggestionsDelay": 5,
"azureFunctions.projectLanguage": "C#",
"vsicons.dontShowNewVersionMessage": true,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.tree.renderIndentGuides": "always",
"sync.quietSync": true,
"editor.fontSize": 15,
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"javascript.preferences.quoteStyle": "single",
"typescript.preferences.quoteStyle": "single",
"prettier.singleQuote": true,
"prettier.tabWidth": 4,
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml",
"editor.tabSize": 2
},
"explorer.confirmDragAndDrop": false,
"[csharp]": {
"editor.defaultFormatter": "ms-vscode.csharp"
},
"explorer.confirmDelete": false,
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.fontSize": 15,
"terminal.integrated.fontFamily": "Dank Mono",
"terminal.integrated.lineHeight": 1.1,
"terminal.integrated.rightClickBehavior": "paste",
"terraform.languageServer": {
"enabled": false,
"args": []
},
"terraform.codelens.enabled": true,
"editor.codeLens": true,
"terraform.indexing": {
"enabled": true,
"liveIndexing": false,
"delay": 500,
"exclude": [
".terraform/**/*",
"**/.terraform/**/*"
]
},
"editor.formatOnSave": true,
"zenMode.hideLineNumbers": false,
"workbench.settings.useSplitJSON": true,
"workbench.settings.editor": "json",
"peacock.affectTabActiveBorder": false,
"peacock.affectAccentBorders": false,
"peacock.affectTitleBar": false,
"peacock.affectActivityBar": true,
"peacock.favoriteColors": [
{
"name": "Angular Red",
"value": "#b52e31"
},
{
"name": "Auth0 Orange",
"value": "#eb5424"
},
{
"name": "Azure Blue",
"value": "#007fff"
},
{
"name": "C# Purple",
"value": "#68217A"
},
{
"name": "Terraform Purple",
"value": "#639"
},
{
"name": "Go Cyan",
"value": "#5dc9e2"
},
{
"name": "JavaScript Yellow",
"value": "#f9e64f"
},
{
"name": "Mandalorian Blue",
"value": "#1857a4"
},
{
"name": "Node Green",
"value": "#215732"
},
{
"name": "Something Different",
"value": "#832561"
},
],
"git.autofetch": true,
"azureTerraform.terminal": "integrated",
"vsonline.planFilter": "/subscriptions/8047fd37-2dc6-4082-bd8b-0da0ab1a24f9/resourceGroups/visualstudio-online/providers/Microsoft.VSOnline/plans/vso-kubernetes"
}
{
"Electron Instruction file": {
"prefix": "electron-quickstart",
"body": [
"const {app, BrowserWindow} = require('electron');",
"const path = require('path');",
"const url = require('url');",
"",
"let mainWindow;",
"",
"function createWindow() {",
"\tconst mainWindowConfig = {",
"\t\twidth: 1000,",
"\t\theight: 700,",
"\t\tcenter: true,",
"\t\ttitle: '${1:MyElectronApp}'",
"\t};",
"\tconst mainWindowUrl = url.format({",
"\t\tpathname: path.join(__dirname, '${2:index}.html'),",
"\t\tprotocol: 'file:',",
"\t\tslashes: true",
"\t});",
"",
"\tmainWindow = new BrowserWindow(mainWindowConfig);",
"\tmainWindow.loadURL(mainWindowUrl);",
"\tmainWindow.webContents.openDevTools();",
"\t",
"\tmainWindow.on('closed', () => {",
"\t\tmainWindow = null;",
"\t});",
"}",
"",
"app.on('ready', createWindow);",
"",
"app.on('window-all-closed', () => {",
"\tif(process.platform !== 'darwin') {",
"\t\tapp.quit();",
"\t}",
"});",
"",
"app.on('activate', () => {",
"\tif(mainWindow === null) {",
"\t\tcreateWindow();",
"\t}",
"});",
"$0"
],
"description": "Creates an Electron Instruction File"
},
"Electron build page url": {
"prefix": "electron-page-url",
"body": [
"const ${1:mainWindowUrl} = url.format({",
"\tpathname: path.join(__dirname, '${2:index}.html'),",
"\tprotocol: 'file:',",
"\tslashes: true",
"});",
"$0"
],
"description": "Build electron page url"
},
"Electron App event 'activate'": {
"prefix": "electron-app-activate",
"body": "${1:app}.on('activate', () => {\n\t$0\n});",
"description": "Electron App 'activate' event"
},
"Electron App event 'window-all-closed'": {
"prefix": "electron-app-window-all-closed",
"body": "${1:app}.on('window-all-closed', () => {\n\t$0\n});",
"description": "Electron App 'ready' event"
},
"Electron App event 'ready'": {
"prefix": "electron-app-ready",
"body": "${1:app}.on('ready', () => {\n\t$0\n});",
"description": "Electron App 'ready' event"
},
"Electron App event 'before-quit'": {
"prefix": "electron-app-before-quit",
"body": "${1:app}.on('before-quit', (event) => {\n\t$0\n});",
"description": "Electron App 'before-quit' event"
},
"Electron App event 'will-quit'": {
"prefix": "electron-app-will-quit",
"body": "${1:app}.on('will-quit', (event) => {\n\t$0\n});",
"description": "Electron App 'will-quit' event"
},
"Electron App event 'quit'": {
"prefix": "electron-app-quit",
"body": "${1:app}.on('quit', (event, exitCode) => {\n\t$0\n});",
"description": "Electron App 'quit' event"
},
"Electron BrowserWindow event 'close'": {
"prefix": "electron-win-close",
"body": "${1:mainWindow}.on('close', (event) => {\n\t$0\n});",
"description": "Electron BrowserWindow 'close' event"
},
"Electron BrowserWindow event 'closed'": {
"prefix": "electron-win-closed",
"body": "${1:mainWindow}.on('closed', () => {\n\t$0\n});",
"description": "Electron BrowserWindow closed event"
},
"Electron BrowserWindow event 'ready-to-show'": {
"prefix": "electron-win-ready-to-show",
"body": "${1:mainWindow}.on('ready-to-show', () => {\n\t$0\n});",
"description": "Electron BrowserWindow ready-to-show event"
},
"Electron BrowserWindow event 'page-title-updated'": {
"prefix": "electron-win-title-updated",
"body": "${1:mainWindow}.on('page-title-updated', (event, title) => {\n\t$0\n});",
"description": "Electron BrowserWindow page-title-updated event"
},
"Electron register GlobalShortcut": {
"prefix": "electron-gsc-register",
"body": [
"globalShortcut.register('${1:CommandOrControl+Shift+D}', () => {",
"\t$0",
"});"
],
"description": "register a globalShortcut"
},
"Electron check global shortcut": {
"prefix": "electron-gsc-is-registered",
"body": "if(!globalShortcut.isRegistered('${1:CommandOrControl+Shift+D}')) {\n\t$0\n}",
"description": "Check if globalShortcut is registered"
},
"Electron unregister global shortcut": {
"prefix": "electron-gsc-unregister",
"body": "globalShortcut.unregister('${1:CommandOrControl+Shift+D}');",
"description": "unregister a global shortcuts"
},
"Electron unregister all global shortcuts": {
"prefix": "electron-gsc-unregister-all",
"body": "globalShortcut.unregisterAll();",
"description": "unregister all global shortcuts"
},
"Electron check if macOS": {
"prefix": "electron-is-macos",
"body": "if(process.platform === 'darwin') {\n\t$0\n}",
"description": "check if running on macOS"
},
"Electron check if linux": {
"prefix": "electron-is-linux",
"body": "if(process.platform === 'linux') {\n\t$0\n}",
"description": "check if running on linux"
},
"Electron check if windows": {
"prefix": "electron-is-windows",
"body": "if(process.platform === 'win32') {\n\t$0\n}",
"description": "check if running on windows"
},
"Electron open url using external default app": {
"prefix": "electron-shell-open-external",
"body": "shell.openExternal('${1:http://thorsten-hans.com}');",
"description": "open an url using default application"
},
"Electron open url in background using external default app": {
"prefix": "electron-shell-open-external-in-background",
"body": [
"const ${1:openExternalOptions} = { activate: false };",
"",
"shell.openExternal('${2:http://thorsten-hans.com}', ${1:openExternalOptions});"
],
"description": "open an url in background using default application"
},
"Electron open file using default app": {
"prefix": "electron-shell-open-item",
"body": "shell.openItem(${1:fullPath});",
"description": "open a file using default OS behavior"
},
"Electron IPC-Main respond async": {
"prefix": "electron-ipcmain-respond-async",
"body": [
"const ${1:messageName} = '${1:messageName}';",
"const ${2:listener} = (event, arg) => {",
"\t$0",
"\tevent.sender.send('${1:messageName}-reply', '${3:answer}');",
"}",
"ipcMain.on('${1:messageName}', ${2:listener});"
],
"description": "respond async to message using ipc"
},
"Electron IPC-Main respond sync": {
"prefix": "electron-ipcmain-respond-sync",
"body": [
"const ${1:messageName} = '${1:messageName}';",
"const ${2:listener} = (event, arg) => {",
"\t$0",
"\tevent.returnValue = '${3:answer}';",
"}",
"ipcMain.on('${1:messageName}', ${2:listener});"
],
"description": "respond sync to a message using ipc"
},
"Electron IPC-Main respond once async": {
"prefix": "electron-ipcmain-respond-once-async",
"body": [
"const ${1:messageName} = '${1:messageName}';",
"const ${2:listener} = (event, arg) => {",
"\t$0",
"\tevent.sender.send('${1:messageName}-reply', '${3:answer}');",
"}",
"ipcMain.once('${1:messageName}', ${2:listener});"
],
"description": "respond once async to message using ipc"
},
"Electron IPC-Main respond once sync": {
"prefix": "electron-ipcmain-respond-once-sync",
"body": [
"const ${1:messageName} = '${1:messageName}';",
"const ${2:listener} = (event, arg) => {",
"\t$0",
"\tevent.returnValue = '${3:answer}';",
"}",
"ipcMain.once('${1:messageName}', ${2:listener});"
],
"description": "respond once async to message using ipc"
},
"Electron IPC-Main remove listener": {
"prefix": "electron-ipcmain-remove-listener",
"body": "ipcMain.removeListener(${1:messageName}, ${2:listener});\n$0",
"description": "remove registered listener for ipc channel"
},
"Electron IPC-Main remove all listeners": {
"prefix": "electron-ipcmain-remove-all-listeners",
"body": "ipcMain.removeAllListeners(${1:messageName});\n$0",
"description": "remove all listeners for a ipc channel"
},
"Electron IPC-Main send message to BrowserWindow": {
"prefix": "electron-ipcmain-send-message",
"body": [
"const ${1:message} = ${2:body};",
"${3:mainWindow}.webContents.send(messageName, ${1:message});\n$0"
],
"description": "send a message from the main process to BrowserWindow"
},
"Electron default menu": {
"prefix": "electron-default-menu",
"body": [
"const template = [",
"{",
"\trole: 'window',",
"\tsubmenu: [",
"\t\t{ role: 'toggledevtools' },",
"\t\t{ type: 'separator' },",
"\t\t{ role: 'togglefullscreen' },",
"\t\t{ type: 'separator' },",
"\t\t{ role: 'minimize' },",
"\t\t{ role: 'close' }",
"\t]",
"}];",
"",
"if (process.platform === 'darwin') {",
"\ttemplate.unshift(",
"\t{",
"\t\tlabel: 'Application',",
"\t\tsubmenu: [",
"\t\t{",
"\t\t\tlabel: 'About Application',",
"\t\t\trole: 'about'",
"\t\t},",
"\t\t{",
"\t\t\ttype: 'separator'",
"\t\t},",
"\t\t{",
"\t\t\tlabel: 'Quit',",
"\t\t\trole: 'quit',",
"\t\t\taccelerator: 'Cmd+Q'",
"\t\t}",
"\t\t]",
"\t});",
"}",
"",
"template.push({",
"\tlabel: 'Help',",
"\tsubmenu: [",
"\t{",
"\t\tlabel: 'Browse Web Site...',",
"\t\tclick: () => {",
"\t\tshell.openExternal('http://www.thinktecture.com');",
"\t\t}",
"\t}]});",
"return template;"
]
}
}
{
// Place your snippets for json here. Each snippet is defined under a snippet name and has a prefix, body and
// description. 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": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Azure Serach Index Suggestor": {
"prefix": "azsearch-suggestor",
"description": "Azure-Search suggestor",
"body": [
"{",
"\"name\": \"$1\",",
"\"searchMode\": \"analyzingInfixMatching\",",
"\"sourceFields\": [\"${3:fieldName}\", \"${4:otherFieldName}\"],",
"}"
]
},
"Azure Search Index Field (minimal)": {
"prefix": "azsearch-min-field",
"description": "Adds a minimal field definition to Azure Search Index",
"body": [
"{",
"\t\"name\": \"${1:name}\",",
"\t\"type\": \"${2:type}\",",
"\t\"searchable\": true,",
"\t\"filterable\": true,",
"\t\"sortable\": true,",
"\t\"facetable\": true,",
"\t\"key\": true,",
"\t\"retrievable\": true,",
"\t\"analyzer\": \"${3:analyzer}\"",
"}"
]
},
"Azure Search Index (minimal)": {
"prefix": "azsearch-min-index",
"description": "A minimal Azure-Search index",
"body": [
"{",
"\t\"name\": \"${1:indexName}\",",
"\t\"fields\": [],",
"\t\"suggesters\": [],",
"\t\"scoringProfiles\": []",
"}"
]
},
"Azure Search Index": {
"prefix": "azsearch-index",
"description": "A full Azure-Search index",
"body": [
"{",
"\t\"name\": \"${1:indexName}\",",
"\t\"fields\": [],",
"\t\"suggesters\": [],",
"\t\"scoringProfiles\": [],",
"\t\"analyzers\": [],",
"\t\"charFilters\": [],",
"\t\"tokenizers\": [],",
"\t\"tokenFilters\": [],",
"\t\"defaultScoringProfile\": \"\",",
"\t\"corsOptions\": {",
"\t\t\"allowedOrigins\": [],",
"\t\t\"maxAgeInSeconds\": 60",
"\t},",
"\t\"encryptionKey\": {",
"\t\t\"keyVaultUri\": \"\",",
"\t\t\"keyVaultKeyName\": \"\",",
"\t\t\"keyVaultKeyVersion\": \"\",",
"\t\t\"accessCredentials\": {",
"\t\t\t\"applicationId\": \"\",",
"\t\t\t\"applicationSecret\": \"\"",
"\t}",
"}",
"}"
]
}
}
{
// Place your global 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"
// }
"Image with Caption": {
"scope": "markdown,md",
"prefix": "image",
"body": ["{% include image-caption.html imageurl=\"/assets/images/posts/$1/$2\"", "title=\"$3\" caption=\"$3\" %}"],
"description": "insert an image with caption (scope jekyll blog)"
},
"External Link": {
"scope": "markdown,md",
"prefix": "linkext",
"body": ["[$1]($2){:target=\"_blank\"}$0"],
"description": "insert an external link"
},
"Front Matter": {
"scope": "markdown,md",
"prefix": "frontmatter",
"body": [
"---",
"title: $1",
"layout: post",
"permalink: $2",
"published: true",
"tags [$3]",
"excerpt: '$4'",
"image: /$5",
"unsplash_user_ref: $6 ",
"unsplash_user_name: $7",
"---",
"$0"
],
"description": "default FrontMatter for Post"
}
}
{
// Place your snippets for markdown here. Each snippet is defined under a snippet name and has a prefix, body and
// description. 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": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"terraform": {
"prefix": "tf",
"body": "*Terraform*"
},
"infrastructure": {
"prefix": "infra",
"body": "infrastructure"
}
}
{
/*
// Place your snippets for Shell Script (Bash) here. Each snippet is defined under a snippet name and has a prefix, body and
// description. 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": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
"Shebang": {
"prefix": "shebang",
"body": "#!/bin/bash\n\n$0",
"description": "she!"
}
}
{
// Conference Demos
"IJS Cordova 1": {
"prefix": "ijs-cdv-one",
"body": [
"if(window.hasOwnProperty('cordova')) {",
"\twindow.document.addEventListener('deviceready', bootstrapNgApp, false);",
"} else {",
"\tbootstrapNgApp();",
"}"
]
},
"IJS Demo 2": {
"prefix": "ijs-cdv-two",
"body": [
"export function cameraServiceFactory(platformInformationService: RuntimeService): CameraService {",
"\treturn platformInformationService.isMobile ? new MobileCameraService() : new DesktopCameraService();",
"}"
]
},
"IJS Demo 3": {
"prefix": "ijs-cdv-three",
"body": "{ provide: CameraService, useFactory: cameraServiceFactory, deps: [RuntimeService] },"
},
//NGX SNIPPETS
"Angular Component": {
"prefix": "ng-comp",
"body": [
"import {Component, ChangeDetectionStrategy} from '@angular/core';",
"",
"@Component({",
"\tselector: '$1',",
"\ttemplateUrl: '${TM_FILENAME_BASE}.html',",
"\tchangeDetection: ChangeDetectionStrategy.${2:OnPush}",
"})",
"export class ${3:Some}Component {",
"",
"\tconstructor() {",
"\t\t$0",
"\t}",
"}"
],
"description": "Creates an Angular Component stub"
},
"Angular Serivce": {
"prefix": "ng-svc",
"body": [
"import {Injectable} from '@angular/core';",
"",
"@Injectable()",
"export class ${1:Some}Service {",
"",
"\tconstructor(${2}) {",
"\t\t",
"\t}",
"",
"\t$0",
"}"
],
"description": "Creates an Angular Service stub"
},
"Angular Pipe": {
"prefix": "ng-pipe",
"body": [
"import {Pipe, PipeTransform} from '@angular/core';",
"",
"@Pipe({",
"\tname: '${1:selector}'",
"})",
"export class ${2:Some}Pipe implements PipeTransform {",
"",
"\tpublic transform(value: any, ...args: any[]): any {",
"\t\t$0",
"\t}",
"}"
],
"description": "Creates an Angular Pipe stub"
},
"Angular module": {
"prefix": "ng-module",
"body": [
"import {NgModule} from '@angular/core';",
"",
"$0",
"",
"@NgModule({",
"\timports: [],",
"\tdeclarations: [],",
"\tproviders: [],",
"\texports: [],",
"})",
"export class ${1:Some}Module{",
"",
"}"
],
"description": "Creates an Angular Module stub"
},
"Angular CanActivateGuard": {
"prefix": "ng-canactivate",
"body": [
"import {Injectable} from '@angular/core';",
"import {ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot} from '@angular/router';",
"import { Observable } from 'rxjs/Observable';",
"",
"@Injectable()",
"export class ${1:Some}Guard implements CanActivate{",
"",
"\tconstructor(${2}) {",
"\t\t",
"\t}",
"",
"\tpublic canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {",
"\t\t${0:return true;}",
"\t}",
"}"
],
"description": "Creates an Angular CanActivate stub"
},
"Angular Output": {
"prefix": "ng-output",
"body": [
"@Output() public ${1:eventName} = new EventEmitter<${2:eventType}>();"
],
"description": "Creates an Angular @Output"
},
"Angular Input": {
"prefix": "ng-input",
"body": [
"@Input() public ${1:propertyName}: ${2:string} = $0;"
],
"description": "Creates an Angular @Output"
},
"Angular Default Route": {
"prefix": "ng-route-default",
"body": [
"{ path: '', pathMatch: 'full', redirectTo: '${1:path}' }$0"
],
"description": "Create am Angular default route path"
},
"Angular 404 Route": {
"prefix": "ng-route-404",
"body": [
"{ path: '**', pathMatch: 'full', component: ${1:NotFoundComponent} }$0"
],
"description": "Create an Angular 404 route path"
},
"Angular ForwardRef":{
"prefix": "ng-forwardref",
"body": "@Inject(forwardRef(()=> ${1})) ${2:private} _${1:name}: ${1:name}$0",
"description": "Create an Angular forwardRef"
},
"Angular provide useClass":{
"prefix": "ng-di-use-class",
"body": "{ provide: ${1:token}, useClass: ${2:class}},\n$0",
"description": "Create DI registration with class"
},
"Angular provide useValue":{
"prefix": "ng-di-use-value",
"body": "{ provide: ${1:token}, useValue: ${2:value}},\n$0",
"description": "Create DI registration with value"
},
"Angular provide useFactory":{
"prefix": "ng-di-use-factory",
"body": "{ provide: ${1:token}, useFactory: ${2:factoryName}, deps: [${3:dependency}]},\n$0",
"description": "Create DI registration with factory"
},
"Angular DI Factory": {
"prefix": "ng-di-factory",
"body": [
"const ${1:name}Factory = (${2:deps}) => {",
"\treturn $0;",
"}"
],
"description": "create factoryMethod for DI"
},
// PLAIN TYPESCRIPT
"TypeScript Getter and Setter": {
"prefix": "getset",
"body": [
"private _${1:name}: ${2:string};",
"",
"public get ${1:name}(): ${2:string} {",
"\t return this._${1:name};",
"}",
"public set ${1:name}(value: ${2:string}) {",
"\t$0",
"\tthis._${1:name} = value;",
"}"
],
"description": "Creates a getter and setter with backing field"
},
// ELECTRON SNIPPETS
"Electron Instruction file": {
"prefix": "electron-instruction",
"body": [
"import {app, BrowserWindow} from 'electron';",
"import * as path from 'path';",
"import * as url from 'url';",
"",
"let mainWindow = null;",
"",
"const createWindow = () => {",
"\tconst mainWindowConfig: Electron.BrowserWindowConstructorOptions = {",
"\t\twidth: 1000,",
"\t\theight: 700,",
"\t\tcenter: true,",
"\t};",
"\tconst mainWindowUrl = url.format({",
"\t\tpathname: path.join(__dirname, 'index.html'),",
"\t\tprotocol: 'file:',",
"\t\tslashes: true",
"\t});",
"",
"\tmainWindow = new BrowserWindow(mainWindowConfig);",
"\tmainWindow.loadURL(mainWindowUrl);",
"\tmainWindow.webContents.openDevTools();",
"\t",
"\tmainWindow.on('closed', () => {",
"\t\tmainWindow = null;",
"\t});",
"}",
"",
"app.on('ready', createWindow);",
"",
"app.on('window-all-closed', () => {",
"\tif(process.platform !== 'darwin') {",
"\t\tapp.quit();",
"\t}",
"});",
"app.on('activate', () => {",
"\tif(mainWindow === null) {",
"\t\tcreateWindow();",
"\t}",
"});"
],
"description": "Creates an Electron Instruction File"
},
"Electron App event 'activate'": {
"prefix": "electron-app-activate",
"body": "${1:app}.on('activate', () => {\n\t$0\n});",
"description": "Electron App 'activate' event"
},
"Electron build page url": {
"prefix": "electron-page-url",
"body": [
"const ${1:mainWindowUrl} = url.format({",
"\tpathname: path.join(__dirname, '${2:index}.html'),",
"\tprotocol: 'file:',",
"\tslashes: true",
"});",
"$0"
],
"description": "Build electron page url"
},
"Electron App event 'window-all-closed'": {
"prefix": "electron-app-activate",
"body": "${1:app}.on('window-all-closed', () => {\n\t$0\n});",
"description": "Electron App 'ready' event"
},
"Electron App event 'ready'": {
"prefix": "electron-app-ready",
"body": "${1:app}.on('ready', () => {\n\t$0\n});",
"description": "Electron App 'ready' event"
},
"Electron App event 'before-quit'": {
"prefix": "electron-app-before-quit",
"body": "${1:app}.on('before-quit', (event: Electron.Event) => {\n\t$0\n});",
"description": "Electron App 'before-quit' event"
},
"Electron App event 'will-quit'": {
"prefix": "electron-app-will-quit",
"body": "${1:app}.on('will-quit', (event: Electron.Event) => {\n\t$0\n});",
"description": "Electron App 'will-quit' event"
},
"Electron App event 'quit'": {
"prefix": "electron-app-quit",
"body": "${1:app}.on('quit', (event: Electron.Event, exitCode: number) => {\n\t$0\n});",
"description": "Electron App 'quit' event"
},
"Electron BrowserWindow event 'close'": {
"prefix": "electron-win-close",
"body": "${1:mainWindow}.on('close', (event: Electron.Event) => {\n\t$0\n});",
"description": "Electron BrowserWindow 'close' event"
},
"Electron BrowserWindow event 'closed'": {
"prefix": "electron-win-closed",
"body": "${1:mainWindow}.on('closed', () => {\n\t$0\n});",
"description": "Electron BrowserWindow closed event"
},
"Electron BrowserWindow event 'ready-to-show'": {
"prefix": "electron-win-ready-to-show",
"body": "${1:mainWindow}.on('ready-to-show', () => {\n\t$0\n});",
"description": "Electron BrowserWindow ready-to-show event"
},
"Electron BrowserWindow event 'page-title-updated'": {
"prefix": "electron-win-title-updated",
"body": "${1:mainWindow}.on('page-title-updated', (event: Electron.Event, title: string) => {\n\t$0\n});",
"description": "Electron BrowserWindow page-title-updated event"
},
"Electron register GlobalShortcut": {
"prefix": "electron-gsc-register",
"body": [
"globalShortcut.register('${1:CommandOrControl+Shift+D}', () => {",
"\t$0",
"});"
],
"description": "register a globalShortcut"
},
"Electron check global shortcut": {
"prefix": "electron-gsc-is-registered",
"body": "if(!globalShortcut.isRegistered('${1:CommandOrControl+Shift+D}')) {\n\t$0\n}",
"description": "Check if globalShortcut is registered"
},
"Electron unregister global shortcut":{
"prefix": "electron-gsc-unregister",
"body": "globalShortcut.unregister('${1:CommandOrControl+Shift+D}');",
"description": "unregister a global shortcuts"
},
"Electron unregister all global shortcuts": {
"prefix": "electron-gsc-unregister-all",
"body": "globalShortcut.unregisterAll();",
"description": "unregister all global shortcuts"
},
"Electron check if macOS": {
"prefix": "electron-is-macos",
"body": "if(process.platform === 'darwin') {\n\t$0\n}",
"description": "check if running on macOS"
},
"Electron check if linux": {
"prefix": "electron-is-linux",
"body": "if(process.platform === 'linux') {\n\t$0\n}",
"description": "check if running on linux"
},
"Electron check if windows":{
"prefix": "electron-is-windows",
"body": "if(process.platform === 'win32') {\n\t$0\n}",
"description": "check if running on windows"
},
"Electron open url using external default app": {
"prefix": "electron-shell-open-external",
"body": "shell.openExternal('${1:http://thorsten-hans.com}');",
"description": "open an url using default application"
},
"Electron open url in background using external default app": {
"prefix": "electron-shell-open-external-in-background",
"body": [
"const ${1:openExternalOptions}: Electron.OpenExternalOptions = { activate: false };",
"",
"shell.openExternal('${2:http://thorsten-hans.com}', ${1:openExternalOptions});"
],
"description": "open an url in background using default application"
},
"Electron open file using default app": {
"prefix": "electron-shell-open-item",
"body": "shell.openItem(${1:fullPath});",
"description": "open a file using default OS behavior"
},
"Electron IPC-Main respond async": {
"prefix": "electron-ipcmain-respond-async",
"body": [
"const ${1:messageName} = '${1:messageName}';",
"const ${2:listener} = (event: Electron.Event, arg: any) => {",
"\t$0",
"\tevent.sender.send('${1:messageName}-reply', '${3:answer}');",
"}",
"ipcMain.on('${1:messageName}', ${2:listener});"
],
"description": "respond async to message using ipc"
},
"Electron IPC-Main respond sync": {
"prefix": "electron-ipcmain-respond-sync",
"body": [
"const ${1:messageName} = '${1:messageName}';",
"const ${2:listener} = (event: Electron.Event, arg: any) => {",
"\t$0",
"\tevent.returnValue = '${3:answer}';",
"}",
"ipcMain.on('${1:messageName}', ${2:listener});"
],
"description": "respond sync to a message using ipc"
},
"Electron IPC-Main respond once async": {
"prefix": "electron-ipcmain-respond-once-async",
"body": [
"const ${1:messageName} = '${1:messageName}';",
"const ${2:listener} = (event: Electron.Event, arg: any) => {",
"\t$0",
"\tevent.sender.send('${1:messageName}-reply', '${3:answer}');",
"}",
"ipcMain.once('${1:messageName}', ${2:listener});"
],
"description": "respond once async to message using ipc"
},
"Electron IPC-Main respond once sync": {
"prefix": "electron-ipcmain-respond-once-sync",
"body": [
"const ${1:messageName} = '${1:messageName}';",
"const ${2:listener} = (event: Electron.Event, arg: any) => {",
"\t$0",
"\tevent.returnValue = '${3:answer}';",
"}",
"ipcMain.once('${1:messageName}', ${2:listener});"
],
"description": "respond once async to message using ipc"
},
"Electron IPC-Main remove listener": {
"prefix": "electron-ipcmain-remove-listener",
"body": "ipcMain.removeListener(${1:messageName}, ${2:listener});\n$0",
"description": "remove registered listener for ipc channel"
},
"Electron IPC-Main remove all listeners": {
"prefix": "electron-ipcmain-remove-all-listeners",
"body": "ipcMain.removeAllListeners(${1:messageName});\n$0",
"description": "remove all listeners for a ipc channel"
},
"Electron IPC-Main send message to BrowserWindow": {
"prefix": "electron-ipcmain-send-message",
"body": [
"const ${1:message}: any = ${2:body};",
"${3:mainWindow}.webContents.send(messageName, ${1:message});\n$0"
],
"description": "send a message from the main process to BrowserWindow"
}
}
{
// Place your snippets for yaml here. Each snippet is defined under a snippet name and has a prefix, body and
// description. 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": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Deployment": {
"prefix": "k8sdeployment",
"body": [
"apiVersion: apps/v1",
"kind: Deployment",
"metadata:",
" name: $1-deployment",
"spec:",
" selector:",
" matchLabels:",
" component: $1",
" replicas: 1",
" template:",
" metadata:",
" labels:",
" component: $1",
" spec:",
" containers:",
" - name: $1-container",
" image: thhdemo.azurecr.io/$0",
" ports:",
" - containerPort: ${2:port}",
],
"description": "minimal k8s deployment"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment