Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# YUI3 Snippets file for Vim SnipMate plugin
# File Format should be simlar to TextMate
# Filetype option in VIM should be set to javascript.yui3
# YUI use block
snippet yui
YUI().use(${1}, function(Y) {
#Standard GET call
snippet io${1:uri}, {
on: {
success: function(txid, response) {
snippet on
on({${1:eventName}, function(ev) {
${2:// body}
snippet pd
snippet each
Y.Array.each(${1:array}, function(value, index, array) {
${2:// body}
snippet delegate
Y.delegate(${1:event}, function(ev) {
${4:// body...}
}, ${2:parentSelector}, ${3:childSelector});
snippet yadd
YUI.add(${1:name}, function(Y) {
${4:// body}
}, ${2:'version'}, ${3:{}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.