tracker issue : CFB-4198321

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] ER for: ability to specify child brace indentation

| View in Tracker

Status/Resolution/Reason: Needs Review//

Reporter/Name(from Bugbase): Aaron Neff / ()

Created: 04/18/2018

Components: Editor Features, Code Formatting

Versions: 2018

Failure Type: Others

Found In Build/Fixed In Build: /

Priority/Frequency: Normal /

Locale/System: /

Vote Count: 0

This ER is for: ability to specify child brace indentation

Steps to Reproduce:

1) In the following, place cursor at "|"
-----------
<cfscript>
if(condition) {
  foo = "bar";|
}
</cfscript>
-----------

2) Press Enter

3) See cursor at "|" (good)
-----------
<cfscript>
if(condition) {
  foo = "bar";
  |
}
</cfscript>
-----------

4) Type a closing brace (to begin an 'else') and see child brace is indented:
-----------
<cfscript>
if(condition) {
  foo = "bar";
  }|
}
</cfscript>
-----------

Some may prefer child braces to be indented. However, I prefer Dreamweaver CS's (not CC's) result:
-----------
<cfscript>
if(condition) {
  foo = "bar";
}|
}
</cfscript>
-----------

See? Dreamweaver didn't indent the child brace.

Suggestion: I'd like an option, in Formatter's settings, to specify if child braces should be indented or not. Setting's label could be "Indent child braces?" w/ a Yes/No toggle.

Additional Suggestion: The Dreamweaver profile could default to not indenting child braces.

Attachments:

Comments: