Code Formatting - indentation of comments

22 views
Skip to first unread message

Andrew Myers

unread,
Apr 19, 2012, 8:25:17 PM4/19/12
to cfml-plugin-fo...@googlegroups.com
Hi,

Do we have any control over the placing of comments in the code formatter?

For example, if I paste this into a new component:

<cfcomponent>
<cfscript>
this.name = Hash(GetCurrentTemplatePath());
/* define the application wide datasource */
this.datasource = "ds_web_content";
/* enable hibernate support for this application */
this.ormenabled = true;
/* create a struct of ORM settings */
this.ormsettings = {eventhandling = "true", cfclocation =
"./components"};
this.sessionmanagement = true;
</cfscript>
</cfcomponent>

The comments are always moved back to the left margin, even though I'd
rather have them indented to the same level of the rest of the block.
Can it be changed?

Andrew.

Doug Hughes

unread,
Apr 19, 2012, 8:59:00 PM4/19/12
to cfml-plugin-fo...@googlegroups.com
Here here!!! I've just been too lazy to submit a bug about this.

Andrew Myers

unread,
Apr 19, 2012, 9:12:24 PM4/19/12
to cfml-plugin-fo...@googlegroups.com
The other one I noticed is that it seems to indent another level after
every carriage return within a comment, which is not behaviour i find
useful.

I guess I should find out about the bug system hey...

Dave Merrill

unread,
Apr 20, 2012, 7:34:42 AM4/20/12
to cfml-plugin-fo...@googlegroups.com
FWIW, I don't see that, in either tag-based or cfscript-based comments. Are you talking about just typing within comments, or pasting?

Dave Merrill

Doug Hughes

unread,
Apr 20, 2012, 11:37:44 AM4/20/12
to cfml-plugin-fo...@googlegroups.com
Try copying and pasting script based cfcs with comments inline.  Like:

compnent{
     // this is an indented comment
     function foo(){
         // this is another comment
     }
}

Copy that into a new cfc file.  The comments will become unindented.

Andrew Myers

unread,
Apr 20, 2012, 6:55:57 PM4/20/12
to cfml-plugin-fo...@googlegroups.com
Hi Dave,

Hmmm, I am certain I was seeing it yesterday, but I can't reproduce it
now. I was typing within a <!--- ---> style comment at the time.

Regards,
Andrew.

Kirill Safonov

unread,
Apr 21, 2012, 10:22:38 AM4/21/12
to cfml-plugin-fo...@googlegroups.com
Hi Andrew,

If it happens again, could you please submit a bug report with sample file
attached? http://youtrack.jetbrains.net/issues/IDEA

Thanks,
Kirill

Reply all
Reply to author
Forward
0 new messages