sublimetext / coldfusion Goto Github PK
View Code? Open in Web Editor NEWColdFusion Sublime Text Package
License: MIT License
ColdFusion Sublime Text Package
License: MIT License
Coldfusion.tmLanguage
Just a small glitch I found when matching comment.line.cfml vs comment.line.html
The current patterns are as follows:<dict> <key>match</key> <string><!--.*--></string> <key>name</key> <string>comment.line.html</string> </dict> <dict> <key>match</key> <string><!---.*---></string> <key>name</key> <string>comment.line.cfml</string> </dict>
In this case coldfusion line comment will never be matched as a comment.line.cfml because the html comment condition will satisfy first.
The fix would be to just invert order
<dict>
<key>match</key>
<string><!---.*---></string>
<key>name</key>
<string>comment.line.cfml</string>
</dict>
<dict>
<key>match</key>
<string><!--.*--></string>
<key>name</key>
<string>comment.line.html</string>
</dict>
when typing on the very last line of the editor window, the closing tag doesn't get added.
Typing <cfelse>
generates a </cfelse>
Also manually typing any closing tag generates a <//tag>
. e.g. typing </cfif>
generates a <//cfif>
It may be a good idea to add a tutorial on how to add and trigger completions that make the advantages of this system clearer.
When typing <cfqueryparam inside an qfquery tag a double << is created like this
<<cfqueryparam value="" cfsqltype="" maxlength="" scale="" null="" list="" separator="" />
It may also be worthwhile to go ahead and add a few more tag/fucntion/misc completions.
The more the merrier since Sublime is smart about choosing your most frequently used completions.
I don't get full color-coding with script based CFCs. Is this not supported?
This is the issue I mentioned previously. You can see the code and a screenshot at the gist below.
scope cfscript catch as tag operator
With commit e61177 I'm losing some comment coloring. I've attached an image of exactly where it is happening, see lines 803 and 817. Let me know if you need me to expand the screenshot out to the right more.
For commenting in an cfm or CFC page, what should be identified as text.html.cfm is identified as source.cfscript.
First Issue:
A test for this is to add the a simple line like below to a cfm or cfc file:
Place the cursor at the beginning of this line, and try and comment it via super + / OR Edit > Comment > Toggle Comment.
You'll notice that the the line is appended with "//". Toggling comment again removes these two.
Second Issue:
If you select the whole like and toggle comments, nothing happens.
Now, if you remove the two files CFScript.tmPreferences and CFScript.tmPreferences.cache, and try the above two cases, you'll see the now you get html comment (and if you press comment again, you get CFML comment).
On the other side, removing these two files screw up commenting in CFScript blocks.
So this leads me to believe that regular cfml markup blocks are being treated under the scope: source.cfscript, followed by the scope text.html, and then text.html.cfm.
CFScript.tmLanguage needs function highlighting
There is already a Sublime Text package named ColdFusion located at (https://github.com/indynagpal/coldfusion-sublime-text-2/tree/master/ColdFusion) and a part of the community packages (http://wbond.net/sublime_packages/community) available via Package Control.
I'm not sure what the best course of action is. Right now a user can install both packages on Linux, but I believe there will be a conflict on Windows and OS X due to case insensitivity in filenames.
I noticed when using tags like cfif, cfset, etc.. inside a cfquery tag the highlighting is broken. Only cfqueryparam seems to be colored.
<cftransaction isolation="read_uncommitted">
<cfquery name="theTableUpdate" datasource="#dsn#">
update MyTable set
isRead=<cfif hasReadEntry>1<cfelse>0</cfif>
where id=<cfqueryparam cfsqltype="cf_sql_integer" value="#currId#">
</cfquery>
</cftransaction>
In the provided example cfif is colored in white (I use a dark twighlight theme).
The same issue is also found in script tags. I guess that is the same issue since it is mixing CF with sql and CF with javascript?...
Try and get as many cfeclipse shortcuts ported/corrected and the sublime shortcuts remapped.
Need to create Symbol List and function dict for cfscript based cfcs
cfscript function arguments in parens need to be scoped.
Hi!
It would be really cool if "Expand selection to scope" can correctly expand selection to a cffunction body. Now it selects the entire cfc body.
Also, "Expand to indentation" malforms if meets a coldfusion comment. No content is selected to the other side of cursor (lower lines is the cursor is above the comment and vice versa).
Thank you
after cfset = cfscript.source should be captured to enable code completion for functions.
Hi folks. First off, thanks for this. I've been using CFEclipse for about 5-6 years now and have longed for an editor that was faster and more svelte than Eclipse but could never part ways until now. This package is key.
So, my question/issue is, when I enable @bbluemel 's TagCompletions package, I seem to lose all of the sweet function completions in CFScript.sublime-completions. Do these have to be mutually exclusive? I have tried the manual install of the TagCompletions package as well as switching to the branch I see in progress here, but the result is the same. With TagCompletions on the function completions go away.
I'd love to contribute here if there's anything you need help with. In particular I'd love to work on a Railo tag library definition file, since I use Railo exclusively now.
Thanks again \m/
Variables on a single line such as:
color properly.
Variables on multiple lines such as:
reset,
fonts,
layout
')#
revert to the default text editor color.
It would be very helpful for the line breaks not to make a difference.
as title... commit incoming to fix
I'm not sure if this is something that just I'm experiencing or its universal. What I'm seeing is that when I open a tag, say a
When creating a <cfqueryparam> tag, the plugin automatically puts a closing </cfqueryparam> tag after it.
scope parens ie for () and braces in cfscrtip.tmlanguage
Heres a new one from the MXUnit code base. Looks like another issue with the "property" word. I'd love to throw my hat in the ring and help fix some of these but my regex is not up to par!
<cfset receiver._copyToNewName(functionNameInReceiver, functionNameInReceiver & "__orig__", true)>
<cfset receiver._mixin( propertyName = functionNameInReceiver,
property = Giver._getComponentVariable(functionName),
ignoreIfExisting = false )>
</cffunction>
<cffunction name="restoreMethod" output="false" access="public" returntype="void" hint="restores a previously overwritten method (via injectMethod) to its original state">
<cfargument name="receiver" type="any" required="true"/>
<cfargument name="functionName" type="string" required="true"/>
<cfset var blender = createObject("component","ComponentBlender")>
<cfset blender._mixinAll(receiver, blender, "_copyToNewName")>
<cfset receiver._copyToNewName(functionName & "__orig__", functionName,false)>
</cffunction>`
If we add all of the html.tmlanguage contents to the ColdFusion.tmlanguage :
Indentation should not occur after statement tags:
cfset
Need to add all cfml tag completions and include uppercase tags as well.
When i install, SublimeText/Coldfusion plugin using package installer, it blocks the ability for me to create file and folders from sublime itself.
Thanks
tagcompletions branch needs to be rebased and merged.
This is definitely nitpicky but if I have a function called initializeSomething() the init part is highlighted differently than the rest of the function name.
Currently, queries in cfscript are just highlighted as plain strings.
If it's possible, it would be great to get syntax highlighting for the queries. I'd like to offer any help I can, so if there are any resources you might point me towards, I'd be glad to take a stab at it myself.
When adding SQL to a CFQUERY in a CFC file the autocomplete causes issues which do not occur when doing the same in a CFM file. For example:
If I try to type the following...
<cfscript>
if ( x > y ) {
stuff();
}
</cfscript>
...the greater than operator triggers tag completion and closes the tag. Not a big deal if you haven't closed the tag yet, but if you're working on an already existing cfscript block, it's impossible to type a greater than symbol (unless there's a key combo I'm missing). Is there a way to disable tag completion within a cfscript block that already has a closing cfscript tag?
Thanks for this project, btw. I dropped Coda for Sublime Text specifically because of the great CF support.
Maybe it would valid to add cf comments instead of sql comments with in a ? What do you guys think?
Example: Want to comment out cfif, I press Shift+Ctrl+/
cfquery name="skldjf" datasource="dkdkfj"
SELECT *
FROM tester
/* cfif arguements.test is " "> WHERE includeMe = 'condition' /cfif */
/cfquery
"auto_complete": false should disable tag attribute completions as well.
cfproperty and property (for cfscript based cfcs) should probably also be included in ctrl/cmd+r panel
RFC...
Possibly need to merge in the HTML empty elements as well?
eg: area|base|br|hr|img|input|link|meta|param
This is a feature I implemented in my Notepad++ plugin, which is quite handy especially if there's no cfoutput tags near by to judge if ones are needed or not. This picture should sum it up pretty well:
I did start making progress on it over here on my fork, however looks like it may possibly conflict with the autocomplete?
I'm on the dev release of Sublime Text 2, build 2203, so I'm not sure if this is only a Dev thing, but whenever I type </cfoutput>
in a CFM file Sublime locks up and must be "Force Quit". This is on Mac OS X Lion.
I can type "</cfoutpu" but as soon as I get to the "u" it locks up. I'm guessing this commit from about 10 hrs ago could be the culprit? SHA: becde23
Change meta.tag.cffoo to meta.tag.cf.foo for better theming support
Need to create Symbol List and cffunction dict for tag based cfcs
_1 Upvote_
I wish I could be more specific but I can't even figure out exactly what line is causing this. When I comment out line 82 I get highlighting through line 88, but it stops there. When I comment out line 88, it stops on the very next line.
I just noticed the mismatched quotes on line 88, don't mind those that was some leftover from my testing of this issue. The problem persists weather the mismatched quotes are there or not.
sample code to reproduce:
package void function notifyChildren(string property, any value)
output=false hint="I notify children of an update"{
var i = 0;
for(i = 1; i <= arrayLen(variables.children); i++){
cascaseObjectUpdate(arguments.property, arguments.value, variables.children[i]);
}
}
package void function cascaseObjectUpdate(String property, any value, any targetObject)
output=false{
var args = {};
args["#arguments.property#"] = arguments.value;
if(structKeyExists(arguments.targetObject, "set#arguments.property#")){
scriptFunctions.invoke(arguments.targetObject, "set#arguments.property#", args);
}
}
define optional method properties in meta.definition.function
The following line causes an error when loading a CFM/CFC with cfscript in it and subsequently stops the plugin from working afterwards.
Line 50: <string>#tag-stuff</string>
Removing the hash does the trick
is there a cfwheels dictionary file?
For some reason content inside cfcomponent tags is not registering as text.html.cfm
Almost all SQL related keywords like SELECT, INSERT, UPDATE, FROM, SET, ORDER/GROUP BY, LIMIT, ON trigger the CF auto-completion making it difficult to add new lines while typing these. It would be nice to be able to disable the auto-completion within <cfquery>.
A way to avoid the new line issue is to disable completion by ENTER changing "setting.auto_complete_commit_on_tab" to true (default is false):
{ "keys": ["enter"], "command": "commit_completion", "context": [ { "key": "auto_complete_visible" }, { "key": "setting.auto_complete_commit_on_tab", "operand": true } ] },
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.