Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing semicolon #196

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions snippets/javascript.snippets
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Very Useful
snippet v
var ${1};${2}
# Prototype
snippet proto
${1:class_name}.prototype.${2:method_name} =
Expand All @@ -15,7 +18,7 @@ snippet f
${3}
}${2:;}
# Immediate function
snippet (f
snippet )f
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this ok? It seems to me that (f is a better snippet than )f

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case of (f, parentheses auto-close plugin will give (f), that's annoying

(function (${1}) {
${3:/* code */}
}(${2}));
Expand Down Expand Up @@ -93,10 +96,10 @@ snippet gett
getElementBy${1:Id}('${2}')${3}
# console.log (Firebug)
snippet cl
console.log(${1});
console.log(${1});${2}
# return
snippet ret
return ${1:result}
return ${1:result};${2}
# for (property in object ) { ... }
snippet fori
for (var ${1:prop} in ${2:Things}) {
Expand Down Expand Up @@ -140,7 +143,7 @@ snippet sing
$1 = function $1($2) {
return instance;
};

// carry over the prototype properties
$1.prototype = this;

Expand All @@ -154,7 +157,7 @@ snippet sing

return instance;
}
# Crockford's object function
# Crockford's object function
snippet obj
function object(o) {
function F() {}
Expand Down