Merge pull request #85 from rbright/master

Changed the CoffeeScript snippet to use the filename as the default class name
This commit is contained in:
Honza Pokorny 2012-03-19 03:37:54 -07:00
commit efa9a98c18

View File

@ -30,20 +30,22 @@ snippet bfun
${2:// body...} ${2:// body...}
# Class # Class
snippet cla class .. snippet cla class ..
class ${1:ClassName} class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`}
${2:// body...} ${2}
snippet cla class .. constructor: .. snippet cla class .. constructor: ..
class ${1:ClassName} class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`}
constructor: (${2:args}) -> constructor: (${2:args}) ->
${3:// body...} ${3}
${4} ${4}
snippet cla class .. extends .. snippet cla class .. extends ..
class ${1:ClassName} extends ${2:Ancestor} class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass}
${3:// body...} ${3}
snippet cla class .. extends .. constructor: .. snippet cla class .. extends .. constructor: ..
class ${1:ClassName} extends ${2:Ancestor} class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass}
constructor: (${3:args}) -> constructor: (${3:args}) ->
${4:// body...} ${4}
${5} ${5}
# If # If
snippet if snippet if