Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Visual Studio Code Settings
{
"recommendations": [
"dbaeumer.vscode-eslint",
"golang.go",
"yzhang.markdown-all-in-one",
"equinusocio.vsc-material-theme-icons",
"gruntfuggly.todo-tree",
"redhat.vscode-yaml"
]
}
{
// 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"
// }
"envrc File": {
"prefix": "envrc",
"body": "# Go path information.\r\nexport GOPATH=$(pwd)\r\nexport GOBIN=$(pwd)/bin\r\nexport PATH=$$PATH:~/godev/gotools/bin:$$GOBIN\r\n\r\n# Load the shared environment variables (shared with Makefile).\r\n# Export the vars in .env into the shell.\r\n# export $(egrep -v '^#' .env | xargs)\r\n\r\n# AWS CLI.\r\n# export AWS_ACCESS_KEY_ID=\r\n# export AWS_SECRET_ACCESS_KEY=\r\n# export AWS_SESSION_TOKEN=\r\n# export AWS_DEFAULT_REGION=us-east-1\r\n\r\n# Go SDK.\r\n# export AWS_REGION=us-east-1",
"description": "Creates an envrc file."
},
}
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+home",
"command": "cursorTop",
"when": "textInputFocus"
},
{
"key": "ctrl+end",
"command": "cursorBottom",
"when": "textInputFocus"
},
{
"key": "cmd+home",
"command": "cursorTop",
"when": "textInputFocus"
},
{
"key": "cmd+end",
"command": "cursorBottom",
"when": "textInputFocus"
},
{
"key": "shift+cmd+home",
"command": "cursorTopSelect",
"when": "textInputFocus"
},
{
"key": "shift+cmd+end",
"command": "cursorBottomSelect",
"when": "textInputFocus"
},
]
// Place your settings in this file to overwrite the default settings
{
//
// Editor.
//
"editor.formatOnSave": true,
"editor.rulers": [
80
],
"editor.fontFamily": "'DejaVu Sans Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 12,
//
// Emmet. Should also install the Extension: https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets
//
"emmet.triggerExpansionOnTab": true,
"emmet.showSuggestionsAsSnippets": true,
//"editor.snippetSuggestions": "top",
//
// Terminal.
//
"terminal.integrated.fontFamily": "'DejaVu Sans Mono', Menlo, Monaco, 'Courier New', monospace",
"terminal.integrated.shell.osx": "/bin/zsh",
//
// Files.
//
"files.associations": {
"*.tmpl": "gohtml"
},
//
// Git.
//
"git.confirmSync": false,
"git.enabled": true,
"git.autofetch": true,
"git.enableSmartCommit": true,
//
// Go.
//
"go.toolsGopath": "/Users/josephspurrier/godev/gotools",
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.inferGopath": true,
"go.formatTool": "goimports",
//"go.useLanguageServer": true,
//"go.formatTool": "goimports",
//
// Workbench.
//
//"workbench.iconTheme": "vs-minimal",
"workbench.startupEditor": "newUntitledFile",
"workbench.iconTheme": "eq-material-theme-icons", // Requires ext: Material Theme Icons.
"todo-tree.tree.showScanModeButton": false, // Requires ext: Todo Tree.
//
// Other.
//
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
}
{
"Mithril Closure": {
"prefix": "mithril-closure",
"body": "import m from 'mithril';\r\n\r\nexport const $1: m.ClosureComponent = () => {\r\n return {\r\n view: () => $2m('div', 'Context'),\r\n };\r\n};\r\n",
"description": "Creates a closure component in Mithril.",
},
"Mithril Storybook": {
"prefix": "mithril-storybook",
"body": "import m from 'mithril';\r\nimport { $1 } from '@\/component\/$2';\r\n\r\nexport default {\r\n title: 'Component\/$3',\r\n component: $1,\r\n};\r\n\r\nexport const $4: m.ClosureComponent = () => ({\r\n view: () => m($1),\r\n});\r\n",
"description": "Creates a storybook component in Mithril.",
},
"Arrow Function": {
"prefix": "arrow",
"body": "($1) => { $2 }",
"description": "Creates an arrow function."
},
"On Click": {
"prefix": "onclick",
"body": "onclick: ($1) => { $2 }",
"description": "Creates an onclick with an arrow function."
},
"Log to Console": {
"prefix": "log",
"body": "console.log($1)",
"description": "Creates a console.log() statement."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment