ColdFusion
ColdFusion copied to clipboard
ST3: Auto-closing tag doesn't indent properly
When I type the > on a cf tag, i.e. <cfif ...> it auto inserts the closing tag two lines down (which is good), but the closing tag is completely flushed left instead of at the same indentation as the opening tag. You end up with something like:
<cfif something is true>
|
</cfif>
I'm seeing the same behavior.
I'm also seeing this behavior:
SublimeText/ColdFusion dev branch commit 4d6122754d86dcccb29389098de0a65b0b9c5645 ST3, Stable, Build 3047 OSX 10.9 3.2 GHz Intel Core i5 8 GB RAM

Let me know if you need any more info. or reproduction info.
Sorry for the dumb question, but how do we apply this fix to the code? It doesn't appear to be included in the development branch. Can I just modify the coldfusion-plugin.py file and save or does it need to be compiled or what?
It hasn't been merged into the project yet. Right now it's just a pull request.
Thanks for the response. When you say that it's just a pull request, does that mean that I can't use it yet or if I can, what exactly do I need to do. I've updated the coldfusion-plugin.py (which I'm guessing is a python file) with the changes, but it's not having any effect. I have no idea if it needs to be compiled or what.
I don't actually know (if it needs to be compiled -- though I suspect not). It sounds like @rossmd is working on a fix though, so probably best to just be patient. :)
Thanks. I'll try to be patient.
fwiw, you just need to edit the coldfusion-plugin.py file and save it. You can change line 143 to:
self.view.insert(edit,temp.b,"\n\t\n</" + tag_name + ">")
Also found changing line 141 to:
indent = not s.get("auto_indent_on_close")
fixes a bug with <cfouptut>
That worked. Thanks for the info regarding cfoutput, that fixed an even more bothersome issue for me. The end tag was being added, but the cursor would go the line above. At least now cfoutput is working the same way as the other tags that have closing tags. Not perfect, but much better. Thanks!