CFML Snippets for Visual Studio Code
A powerful collection of ColdFusion (CFML) code snippets designed to speed up development and boost productivity inside Visual Studio Code.
This extension includes over 30 ready-to-use snippets covering everything from basic tags like <cfoutput>
to advanced structures like <cfstoredproc>
and <cfloop>
.
🎬 Demo
Here’s how it works in a CFML file:

✨ Features
✅ Supports 30+ commonly used ColdFusion tags
✅ Tabstop navigation and selected text handling
✅ Consistent, mnemonic prefixes (e.g., _cf
, _cfl
, _cff
, _cfqp
, _br
, _tab
)
✅ HTML support for <br>
tags
✅ Cross-language support with global utility snippets
💻 Snippet Prefix Reference
Prefix |
Inserts |
Shortcut Key |
_cfcom |
<!--- comment ---> |
Ctrl + Shift + . |
_cfout |
<cfoutput>#...#</cfoutput> |
Ctrl + Shift + , |
_cfd |
<cfdump> |
|
_cfd_c |
<cfdirectory action="create"> |
|
_cfd_d |
<cfdirectory action="delete"> |
|
_cfd_l |
<cfdirectory action="list"> |
|
_cfd_r |
<cfdirectory action="rename"> |
|
_cff_a |
<cffile action="append"> |
|
_cff_c |
<cffile action="copy"> |
|
_cff_d |
<cffile action="delete"> |
|
_cff_m |
<cffile action="move"> |
|
_cff_rd |
<cffile action="read"> |
|
_cff_rdb |
<cffile action="readBinary"> |
|
_cff_ren |
<cffile action="rename"> |
|
_cff_u |
<cffile action="uploadall"> |
|
_cff_w |
<cffile action="write"> |
|
_cffun |
<cffunction> ... </cffunction> |
|
_cfi |
<cfinclude template="..."> |
|
_cfif |
<cfif> ... </cfif> |
|
_cfif_e |
<cfif> ... <cfelse> ... </cfif> |
|
_cfif_eif |
<cfif> ... <cfelseif> ... <cfelse> |
|
_cfif_i |
((condition) ? trueState : falseState) |
|
_cfif_de |
<cfif !directoryExists> |
|
_cfif_fe |
<cfif fileExists> |
|
_cfl_a |
<cfloop array="..."> |
|
_cfl_ai |
<cfloop index="i" from="1" to="#arrayLen(...)#"> |
|
_cfl_i |
<cfloop index="i" from="1" to="10"> |
|
_cfl_q |
<cfloop query="..."> |
|
_cfl_qw |
<cfquery> + <cfloop query="..."> |
|
_cfl_s |
<cfloop collection="..."> |
|
_cfq |
<cfquery name="..." datasource="..."> |
|
_cfq_opt |
<cfquery><select><option> |
|
_cfq_rad |
<cfquery><input type="radio"> |
|
_cfqp_i |
<cfqueryparam cfsqltype="cf_sql_integer"> |
|
_cfqp_v |
<cfqueryparam cfsqltype="cf_sql_varchar"> |
|
_cfqp_nv |
<cfqueryparam cfsqltype="cf_sql_nvarchar"> |
|
_cfs |
<cfset var = value> |
|
_cfs_t |
<cfset var = "text"> |
|
_cfs_date |
<cfset today = dateFormat(...)> |
|
_cfs_ddif |
<cfset diff = dateDiff(...)> |
|
_cfs_ts |
<cfset timestamp...> |
|
_cftry_c |
<cftry>...<cfcatch>...</cfcatch></cftry> |
|
_cfsto |
<cfstoredproc> ... </cfstoredproc> |
|
_tab |
${1:...} wrapper using selected text |
Ctrl + Alt + Shift + . |
🔹 Snippets are grouped with consistent prefixes for fast discovery
🔹 All are accessible via IntelliSense or by typing the prefix and pressing Tab
📦 Requirements
In order for this plugin to work, it requires the CFML language to be defined in Visual Studio Code. This requires at least one of the following extensions to be installed :
Other extensions providing syntax highlighting and language features for .cfm
and .cfc
files can be preferred too.
⚙ Extension Settings
This extension define 3 keybindings which can be viewed in Snippet Prefix Reference section.
All snippets are triggered by prefix + Tab
or from the IntelliSense suggestion menu.
🛠️ Usage
- Open a
.cfm
, .cfc
, or .html
file.
- Type a snippet prefix (e.g.,
_cfout
, _cffun
, _cfl_q
, _br2
, _tab
)
- Press
Tab
to insert the snippet.
- Press
Tab
again to navigate through the placeholders.
🐞 Known Issues
No known issues at this time.
Please report any bugs or feature requests via the repository issue tracker.
🔗 Resources
Made with ❤️ by Murat UZUN