ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Mongoose Coffee​Script

by PranavSathy ST3

Better CoffeeScript with Mongoose Snippets & Syntax Highlighting

Details

Installs

  • Total 3K
  • Win 1K
  • Mac 872
  • Linux 710
Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Jump to Section

Overview

This package is for Sublime Text 3. There is no support for older versions of Sublime, please feel free to fork and add that support.

** Most of this README is taken directly from Better Coffeescript by aponxi **

Please refer to the original repository @ https://github.com/aponxi/sublime-better-coffeescript to see more elaborate / platform specific instructions, and simply replace the URL of the git repository, and rename “Better CoffeeScript” to “Mongoose CoffeeScript”

Description

Originally cloned from Better Coffeescript by [aponxi] : https://github.com/aponxi/sublime-better-coffeescript . After developing in CoffeeScript for awhile, and utilizing Express.js and Mongoose ODM, I realized that a majority of my RESTful API was several calls to Models and querying and fetching data. I loved Better CoffeeScript, but I realized that it would be even better (for me) if it had syntax highlighting where I utilized my models. So… I decided to pull it and make it seperate.

I hope it comes of use, and if you find any bugs or general enhancements, please report it in the issues page.

Installation

via Package Control

This is the recommended installation method.

If you have Sublime Package Control, you know what to do. If not, well: it's a package manager for Sublime Text 3. Installation guide can be found here. After installing the package manager:

  • Open the Command Pallete (ctrl+shift+P or cmd+shift+P).
  • Type “Install Package” and hit return.
  • Type “Mongoose CoffeeScript” and hit return.

via Source Control

If you plan to contribute, then you should install via this method. Otherwise it is recommended that you install the package via Package Control above

Sublime stores packages in the following locations:

Nix: ~/.config/sublime-text-3/packages
Mac: ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
Win: %APPDATA%\Sublime Text 3\Packages

Open a Terminal/Console and run the following commands, replacing PACKAGE_PATH with the path corresponding to your OS above.

cd PACKAGE_PATH
git clone https://github.com/PranavSathy/sublime-mongoose-coffeescript.git "Mongoose CoffeeScript"

Snippets

  • Use TAB to run a snippet after typing the trigger.
  • Use TAB and shift+TAB to cycle forward/backward through fields.
  • Use ESC to exit snippet mode.

Snippet Triggers

Mongoose

aggregate:  agg
count: cnt
create: crt
discriminator: disc
distinct: dist
ensureIndexes: enin
findById: fbi
findByIdAndRemove: fbir
findByIdAndUpdate: fbiu
findOne: fo
findOneAndRemove: mfor
findOneandUpdate: fou
geoNear: gn
geoSearch: gs
mapReduce: mr

Latest Changelog

v0.1.0 May 16th, 2015

  • Cloned from sublime-better-coffeescript
  • Added mongoose specific Snippets
  • Syntax highlighting for RegEx Model.{mongooseFunc}

Credits

  • As mentioned before, thanks to all the individual contributors of the sublime-better-coffeescript project for making my day that much better, and to [aponxi] himself for the same reason as well.