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 2K
  • Win 957
  • OS X 690
  • Linux 521
Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7
Windows 1 0 3 2 1 0 2 0 1 0 0 0 1 1 2 0 1 1 0 2 0 0 2 0 0 2 0 0 2 0 0 0 1 0 0 1 2 4 1 0 2 0 0 1 0
OS X 0 0 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 0 0
Linux 0 0 0 0 0 2 1 0 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 2 0 0 0 1 0 0 1

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.