Sublime Forum

Having trouble with key mappings

#1

I want to create a key mapping for ColdFusion coments.

HTML comments use

ColdFusion is almost the same, except one more dash is added, <!— --->

I looked to see how modify the key mappings, or create a new one,
but I couldn’t quite find enough information.

I found this for HTML comments:

{ "keys": "ctrl+/"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": "ctrl+shift+/"], "command": "toggle_comment", "args": { "block": true } },

But I don’t understand how to define “toggle_comment” (which I am assuming
is defining the characters inserted… is is that args?) Any way, I’m stuck and would
appreciate some guidance.

Thanks!

Rick :smile:

0 Likes

#2

I think you may need to define a new language. Look at Packages/HTML/Comments.tmPreferences for the HTML comment settings. You can see that they apply to “text.html”. I guess maybe you need to add a new language for the ColdFusion markup (“text.cfml”?)and then define the CF comments for that language.

0 Likes

#3

Importing this TextMate Cold Fusion bundle might do all you need, maybe?
http://code.google.com/p/cftextmate/

0 Likes

#4

There is a ST2 specific package for this now github.com/SublimeText/ColdFusion

0 Likes