Last active
October 13, 2023 20:42
-
-
Save jimpriest/8a4af2f53855c5c19fa91fcfcc716610 to your computer and use it in GitHub Desktop.
VSCode CFML snippet examples
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
{ | |
"cfdump": { | |
"prefix": "cfdump", | |
"body": [ | |
"<cfdump var=\"#$TM_SELECTED_TEXT#\" abort=\"${2:true}\" format=\"${3:html}\" label=\"${4:dump - debugging}\">" | |
], | |
"description": "cfdump" | |
}, | |
"writedump": { | |
"prefix": "writedump", | |
"body": [ | |
"writeDump(var=\"#$TM_SELECTED_TEXT#\", abort=\"${2:true}\", format=\"html\", label=\"${3:dump - debugging}\")" | |
], | |
"description": "writeDump" | |
}, | |
"queryparam1": { | |
"prefix": "queryparam1", | |
"body": [ | |
"<cfqueryparam value=\"$TM_SELECTED_TEXT\" cfsqltype=\"${1|cf_sql_nvarchar,cf_sql_integer,cf_sql_numeric,cf_sql_tinyint,cf_sql_bit,cf_sql_longnvarchar,cf_sql_longvarchar,cf_sql_varchar,cf_sql_smallint,cf_sql_date,cf_sql_time,cf_sql_timestamp|}\">" | |
], | |
"description": "queryparam1" | |
}, | |
"cfoutput": { | |
"prefix": "cfoutput1", | |
"body": [ | |
"<cfoutput>$TM_SELECTED_TEXT</cfoutput>" | |
], | |
"description": "cfoutput1" | |
} | |
} | |
[ | |
{ | |
"key": "ctrl+shift+alt+d", | |
"command": "editor.action.insertSnippet", | |
"when": "editorTextFocus", | |
"args": { | |
"name": "cfdump" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+alt+s", | |
"command": "editor.action.insertSnippet", | |
"when": "editorTextFocus", | |
"args": { | |
"name": "writedump" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+alt+q", | |
"command": "editor.action.insertSnippet", | |
"when": "editorTextFocus", | |
"args": { | |
"name": "queryparam1" | |
} | |
}, | |
{ | |
"key": "ctrl+shift+alt+o", | |
"command": "editor.action.insertSnippet", | |
"when": "editorTextFocus", | |
"args": { | |
"name": "cfoutput1" | |
} | |
} | |
] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment