Skip to content

Instantly share code, notes, and snippets.

@meanyb
Created May 10, 2018 19:12
Show Gist options
  • Save meanyb/680179e4953998d43dbc8f1af290e0b9 to your computer and use it in GitHub Desktop.
Save meanyb/680179e4953998d43dbc8f1af290e0b9 to your computer and use it in GitHub Desktop.
{
/*
Just some basic elixir snippets for vsCode. This file should be named elixir.json
*/
"defmacro": {
"prefix": "defmac",
"body": [
"defmacro ${1:module_name} do",
"$0",
"end"
],
"description": "define a macro"
},
"defmodule": {
"prefix": "defmod",
"body": [
"defmodule ${1:module_name} do",
"$0",
"end"
],
"description": "define a module"
},
"moduledoc": {
"prefix": "modd",
"body": [
"@moduledoc \"\"\"",
"$0",
"\"\"\""
],
"description": "module docs"
},
"doc": {
"prefix": "doc",
"body": [
"@doc \"\"\"",
"$0",
"\"\"\""
],
"description": "function docs"
},
"Print string": {
"prefix": "put",
"body": [
"IO.puts(\"$1\")"
],
"description": "Print string"
},
"Inspect data": {
"prefix": "insp",
"body": [
"IO.puts(\"[inspect] ${1}: #{inspect(${2})}\")"
],
"description": "Inspect data"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment