Useful CoffeeScript code snippets for Visual Studio Code. Contains snippets from Atom.
clacreates a new classelcreates an else blockelifcreates an else-if blockerrorcreates an error throw statementforafor array comprehensionfor element in arrayforofor object comprehensionfor property of elementforrfor tange comprehensionfor element in [start..finish] by stepfcreates a new functionifcreates an if blockiftcreates a ternary if statementif condition then valuekvcreates a key and value statementkey: valuelogcreates a console log callconsole.log valuereqcreates a require statementfs = require 'fs'trycreates a try-catch blockwarncreates a console warn callconsole.warn valueinfocreates a console info callconsole.info value
- Open Visual Studio Code and launch the command palette
- Type in
ext install coffeescript-snippetsand select the package - Restart Visual Studio Code
Feel free to send pull requests!
MIT
