Skip to content

Instantly share code, notes, and snippets.

@zeke
Created January 26, 2021 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeke/8c0112e93830b0fda851c38fc61110a7 to your computer and use it in GitHub Desktop.
Save zeke/8c0112e93830b0fda851c38fc61110a7 to your computer and use it in GitHub Desktop.
Ruby ERB localization snippets for VS Code
{
// Place your snippets for erb 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.
"render-pet": {
"prefix": "pet",
"body": [
"<%= t(\"$1\") %>"
],
"description": "render block pe with t helper"
},
"render-peg": {
"prefix": "peg",
"body": [
"<%= _(\"$1\") %>"
],
"description": "render block pe with gettext"
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment