From bf0965fb6e0935706f79f379c095f4c5bf957ffb Mon Sep 17 00:00:00 2001 From: Joe Lencioni Date: Sun, 5 Jan 2014 07:35:35 -0800 Subject: [PATCH] Add missing console API methods to JS snippets This commit adds snippets for the following console API methods that were missing: - console.clear - console.dir - console.dirxml - console.groupCollapsed - console.info - console.profile - console.table I left out console.debug and console.exception since they are simply aliases for console.log and console.error. Information about the console API can be found at: https://developers.google.com/chrome-developer-tools/docs/console-api https://developer.mozilla.org/en-US/docs/Web/API/console --- UltiSnips/javascript.snippets | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/UltiSnips/javascript.snippets b/UltiSnips/javascript.snippets index 2dce575..e3d7c68 100644 --- a/UltiSnips/javascript.snippets +++ b/UltiSnips/javascript.snippets @@ -83,6 +83,18 @@ snippet ca "console.assert" console.assert(${1:assertion}, ${2:"${3:message}"}); endsnippet +snippet cclear "console.clear" +console.clear(); +endsnippet + +snippet cdir "console.dir" +console.dir(${1:object}); +endsnippet + +snippet cdirx "console.dirxml" +console.dirxml(${1:object}); +endsnippet + snippet ce "console.error" console.error(${1:"${2:value}"}); endsnippet @@ -93,10 +105,30 @@ ${VISUAL}$0 console.groupEnd(); endsnippet +snippet cgroupc "console.groupCollapsed" +console.groupCollapsed("${1:label}"); +${VISUAL}$0 +console.groupEnd(); +endsnippet + +snippet ci "console.info" +console.info(${1:"${2:value}"}); +endsnippet + snippet cl "console.log" console.log(${1:"${2:value}"}); endsnippet +snippet cprof "console.profile" +console.profile("${1:label}"); +${VISUAL}$0 +console.profileEnd(); +endsnippet + +snippet ctable "console.table" +console.table(${1:"${2:value}"}); +endsnippet + snippet ctime "console.time" console.time("${1:label}"); ${VISUAL}$0