Open bdw429s opened 9 years ago
@bdw429s is there a textmate mode for cfc?
I'm afraid I don't know enough about textmate to answer that question. I do know that .cfm files do format markup correctly. I assume .cfc files might need to be associated with ColdFusion, but it should be noted that unlike .cfm files which are always markup (tags), a .cfc file might be tags or script and one must parse the contents to detect if it has a
Ah, so the issue is only about recognizing cfm extension, not about adding a new mode.
For detecting tags/script initial state, is it enough to just check for a <
at the start of the file?
Perhaps. I don't know if the existing CFML mode will handle script outside of a
That said, I'm not sure exactly how ColdFusion parses them since I suppose the following would be a valid script CFC though probably an edge case:
component {
myString = '<cfcomponent>';
}
Comments and other text are allowed at the start of a CFC file before the actual component definition
you mean the following should be in tag mode?
foo bar baz
<cfcomponent hint="this is a tag">
<cfcomponent>
btw which other editors support CFC?
Yes, that would be a valid tag-based component.
There are a lot of editors that support CFML, but I'm not sure if you're just asking about web-based editors or any IDE in general. IDEs include ColdFusion Builder, CFEclipse, Dreamweaver, SublimeText. FWIW, the GitHub website file viewer supports CFCs correctly. I helped make that happen last year. I'm not sure about any web-based editors, but honestly I've never personally used a web-based editor for CFML other than on Runnable.com -- which come to think of it uses ACE editor too. I recall bugging them about CFML support too. So I guess this will be killing two birds with one stone.
Would love to see the support for this.
Please add support for this.
Any update on this. Looks like cloud9 still doesn't support a .cfc
@nightwing, Any updates on this?
Please just make .cfc behave the same exact way as .cfm - that would solve 90% of the problem (maybe 100%) - just add it as another recognized extension - it's very difficult to edit cfc files without any highlighting.
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Yes, this feature is still desired.
There are already ColdFusion highlighting rules, and it is possible to extend on those if needed for ColdFusion components. Just like how ColdFusion now extends HTML highlighting rules, and HTML highlighting rules in turn extends XML highlighting rules. Be sure to add the tests as well. We have a guide for adding syntax highlighting to Ace, feel free to create a PR for the ColdFusion Components: https://ace.c9.io/#nav=higlighter
I created a PR (#5072) for using the ColdFusion mode for .cfc
, as suggested in this ticket.
Cloud9's CFML support does not recognize the CFC extension (ColdFusion Component). CFCs can have tags in them like this:
https://github.com/ColdBox/coldbox-platform/blob/3.8.1/system/web/Controller.cfc
or FULL script like this version of the same component:
https://github.com/ColdBox/coldbox-platform/blob/development/system/web/Controller.cfc