Skip to content

Instantly share code, notes, and snippets.

@simianhacker
Created August 24, 2013 02:14
Show Gist options
  • Save simianhacker/6325644 to your computer and use it in GitHub Desktop.
Save simianhacker/6325644 to your computer and use it in GitHub Desktop.
This snippet will convert `req` to `var SomeName = require('some_name');`
snippet req "Require a module where it converts CamelCase to underscore (camel_case)" !b
var ${1:name} = require(${2:'${3:${1/(^[A-Z])|([A-Z])/(?2:_\l$2:\l$1)/g}}'});
endsnippet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment