Skip to content

Instantly share code, notes, and snippets.

@zeffii
Created January 24, 2014 22:33
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 zeffii/8608175 to your computer and use it in GitHub Desktop.
Save zeffii/8608175 to your computer and use it in GitHub Desktop.
{
"patterns": [
{
"pattern_name": "varname:iterations",
"pattern_regex": "(\\S+):(\\w+)",
"lines": [
"for (var {0} = 0; {0} < {1}; {0} += 1) {",
"{indent}{0};",
"}"
]
},
{
"pattern_name": "varname:iterable",
"pattern_regex": "(\\S+):(\\w+)\\[\\]?",
"lines": [
"for (var {0} = 0; {0} < {1}.length; {0} += 1) {",
"{indent}{1}[{0}];",
"}"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment