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
Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8
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.