ilich / vscode-coldfusion

Visual Studio Code CFML (ColdFusion) Language Support
MIT License
40 stars 15 forks source link

Keyboard Shortcuts for cfdump and cfoutput tags #42

Closed rejithtechver closed 6 years ago

rejithtechver commented 6 years ago

Is there any way setup shortcuts for <cfoutput>(CTRL + SHIFT + O) and <cfdump>(CTRL + SHIFT + D) like we have in Sublime Text?

rejithtechver commented 6 years ago

This can be done by editing the keybindings.json and adding

{   
    "key": "ctrl+shift+d",
    "command": "editor.action.insertSnippet",
    "when": "editorTextFocus && !editorReadonly && editorLangId == 'cfml'",
    "args": {"snippet": "<cfdump var=\"#${TM_SELECTED_TEXT}#\">"}
},
{   "key": "ctrl+shift+o",
    "command": "editor.action.insertSnippet",
    "when": "editorTextFocus && !editorReadonly && editorLangId == 'cfml'",
    "args": {"snippet": "<cfoutput>#${TM_SELECTED_TEXT}#</cfoutput>"}
}