Created
December 14, 2014 23:04
-
-
Save anareyna/faf5cf6931d2cec6bc77 to your computer and use it in GitHub Desktop.
Sublime Snippets
This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
/** | |
* ${2:Descripción del módulo} | |
* @submodule ${3:nombre_del_modulo} | |
* @main ${1:default} | |
* @author ${4:Nombre del Autor} | |
*/ | |
yOSON.AppCore.addModule("${3:nombre_del_modulo}", function(Sb){ | |
var st = { | |
${5:container}: '${6:#container}', | |
${7:btnSearch}: '${8:#btnSearch}' | |
}, | |
dom = {}, | |
catchDom = function() { | |
dom.${5:container} = \$(st.${5:container}); | |
dom.${7:btnSearch} = \$(st.${7:btnSearch}); | |
}, | |
suscribeEvents = function() { | |
dom.${10:btnSearch}.on('${11:click}', ${12:search}); | |
}, | |
${13:search} = function() { | |
${14} | |
}, | |
initialize = function(oP) { | |
\$.extend(st, oP); | |
catchDom(); | |
suscribeEvents(); | |
}; | |
return { | |
init: initialize | |
}; | |
}, ['${15:ruta_del_archivo_de_dependencia.js}']); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>addModule</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.js</scope> --> | |
</snippet> |
This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
var Demo = ( function() { | |
var st = { | |
element : '.element' | |
}, | |
dom = {}, | |
catchDom = function() { | |
dom.element = \$(st.element); | |
}, | |
subscribeEvents = function() { | |
dom.element.on('click', events.myFunction); | |
}, | |
events = { | |
myFunction: function() { | |
} | |
}, | |
functions = { | |
}, | |
initialize = function() { | |
catchDom(); | |
subscribeEvents(); | |
}; | |
return { | |
init: initialize | |
} | |
})(); | |
Demo.init(); | |
]]></content> | |
<tabTrigger>demojs</tabTrigger> | |
</snippet> |
This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
console.log('${1::)}'); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>log</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> | |
</snippet> |
This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
head | |
meta(charset='utf-8') | |
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1') | |
meta(name='language', content='es') | |
title Titulo | |
meta(name='title', content='Titulo') | |
meta(name='viewport', content='width=device-width, initial-scale=1') | |
link(href='estilos.css', media='all', rel='stylesheet') | |
body | |
.wrapper | |
p content | |
script(src='https://code.jquery.com/jquery-2.1.1.min.js') | |
script(src='script.js') | |
]]></content> | |
<tabTrigger>maqueta</tabTrigger> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment