-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename HTML5 to html.html5; Rename JS-ConsoleLog to js.console-log; A…
…dd gitignore snippet, js.function, js.module and js.module.gettersetter
- Loading branch information
1 parent
537d770
commit 126072a
Showing
6 changed files
with
167 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
# Numerous always-ignore extensions | ||
*.diff | ||
*.err | ||
*.orig | ||
*.log | ||
*.rej | ||
*.swo | ||
*.swp | ||
*.vi | ||
*~ | ||
*.sass-cache | ||
# tasks | ||
*.tasks | ||
*.todo | ||
# OS or Editor folders | ||
.DS_Store | ||
Thumbs.db | ||
.cache | ||
.project | ||
.settings | ||
.tmproj | ||
*.esproj | ||
*.sublime-project | ||
*.sublime-workspace | ||
# Folders to ignore | ||
.svn | ||
.idea | ||
]]></content> | ||
<tabTrigger>.gitignore</tabTrigger> | ||
<description>Default .gitignore</description> | ||
</snippet> |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
function ${1:name}( ${2:variables} ) { | ||
${0:return true;} | ||
} | ||
]]></content> | ||
<tabTrigger>function</tabTrigger> | ||
<scope>source.js</scope> | ||
<description>function() {return true}</description> | ||
</snippet> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<snippet> | ||
<content><![CDATA[${1:// x = object | ||
${3:x}: function( key, value ){ | ||
if ( key ) { | ||
var t = typeof key; | ||
if ( t === 'object' ) { | ||
return _x = \$.extend( {\}, _x, key ); | ||
\} else if ( t === 'string' && value ) { | ||
var obj = {\}; | ||
obj[key] = value; | ||
return _x = \$.extend( {\}, _x, obj ); | ||
\} else if ( t === 'string') { | ||
return _x[input]; | ||
\} else { | ||
return false; | ||
\} | ||
\} else { | ||
return _x; | ||
\} | ||
\}}${2:, | ||
// x = string or number | ||
${4:x}: function( value ){ | ||
if ( value ) { | ||
var t = typeof value; | ||
if ( t === 'string') { | ||
return _y = value; | ||
\} else if ( t === 'number') { | ||
return _y = value; | ||
\} else { | ||
return false; | ||
\} | ||
\} else { | ||
return _y; | ||
\} | ||
\}} | ||
]]></content> | ||
<tabTrigger>module.getset</tabTrigger> | ||
<scope>source.js</scope> | ||
<description>Module part: Getter / Setter</description> | ||
</snippet> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
var ${1:Module} = function( options ) { | ||
var _privateValue = 10; | ||
var _private = ( typeof options == 'object' ) ? \$.extend( {}, _defaults, options ) : options; | ||
function _privateFunction( ) { | ||
return true; | ||
} | ||
function ${1:Module}() { | ||
this._private = _private; // Private only by convention | ||
this.instanceValue = 10; // Instance propertie | ||
} | ||
${1:Module}.prototype = { | ||
init: function( options ) { | ||
var self = this; | ||
console.log( 'init with options: ', options ); | ||
}, | ||
machine = { | ||
speak: function(){ | ||
return 'hello'; | ||
}, | ||
stop: function(){ | ||
console.log('Stop'); | ||
} | ||
} | ||
} | ||
return new ${1:Module}(); | ||
} | ||
]]></content> | ||
<tabTrigger>module</tabTrigger> | ||
<scope>source.js</scope> | ||
<description>Module + Closure</description> | ||
</snippet> |