Created
May 22, 2010 05:45
-
-
Save foxxtrot/409816 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# YUI3 Snippets file for Vim SnipMate plugin | |
# http://www.vim.org/scripts/script.php?script_id=2540 | |
# 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) { | |
${2} | |
}); | |
#Standard YUI3.io GET call | |
snippet io | |
Y.io(${1:uri}, { | |
on: { | |
success: function(txid, response) { | |
${2:body} | |
} | |
} | |
}); | |
snippet on | |
on({${1:eventName}, function(ev) { | |
${2:// body} | |
}); | |
snippet pd | |
preventDefault(); | |
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