public
Description: Dojo snippets for yasnippets emacs-mode
Homepage: http://sethmason.com/blog/38/dojo-snippets-for-emacs
Clone URL: git://github.com/slackorama/dojo-yasnippets.git
name age message
file README.markdown Fri Jun 05 20:53:47 -0700 2009 Fixed some problems in the README [Seth Mason]
file dc Sat Dec 13 23:59:27 -0800 2008 Initial checkin [Seth Mason]
file dd Sat Dec 13 23:59:27 -0800 2008 Initial checkin [Seth Mason]
file dfor.console Sat Dec 13 23:59:27 -0800 2008 Initial checkin [Seth Mason]
file dfor.function Sat Dec 13 23:59:27 -0800 2008 Initial checkin [Seth Mason]
file dload Sat Dec 13 23:59:27 -0800 2008 Initial checkin [Seth Mason]
file dp Sat Dec 13 23:59:27 -0800 2008 Initial checkin [Seth Mason]
file dq.connect Sat Dec 13 23:59:27 -0800 2008 Initial checkin [Seth Mason]
file dq.forEach Sat Dec 13 23:59:27 -0800 2008 Initial checkin [Seth Mason]
file dq.style Sat Dec 13 23:59:27 -0800 2008 Initial checkin [Seth Mason]
file dr Sat Dec 13 23:59:27 -0800 2008 Initial checkin [Seth Mason]
file ds Sat Dec 13 23:59:27 -0800 2008 Initial checkin [Seth Mason]
file widget Sat Dec 20 21:06:08 -0800 2008 Adding widget snippet [Seth Mason]
README.markdown

Introduction

This is a collection of snippets for YASnippet for use with writing a JavaScript file using the dojo framework.

Installation

I use Steve Yegge's excellent js2-mode so I defined a derived mode named dojo-js-mode by adding this to my .emacs

  (define-derived-mode dojo-js-mode js2-mode "dojo")

I then created the 'js2-mode' directory in my snippets directory and then created the subdirectory 'dojo-js-mode' in that directory. All of these snippets are placed in the 'dojo-js-mode' directory. So, my snippet directory looks like this:

|-- text-mode
|   |-- js2-mode
|   |   |-- dojo-js-mode

Because they are in my snippets directory, they are all loaded when YASnippet initializes (or M-x yas/reload-all).

Using The Snippets

When I fire up a JavaScript file that will contain dojo, I immediately run 'M-x dojo-js-mode'. Then all of these snippets are available.

I tried to keep the first two letters for each major function you might use a lot in dojo. Thus, 'dc' becomes 'dojo.connect', 'dr' becomes 'dojo.require'.

Contact

Feel free to file an issue at Github if you want to add anything to this project. If you fork it, feel free to send me a pull request.

Resources

YASnippet

js2-mode

Dojo