3 Replies Latest reply on May 6, 2010 12:38 AM by RandomReado

    DW CS5 - Functionality removed or is this a bug?

    RandomReado Level 1

      This issue is referred to as "align parameters in function declarations" in Flash Builder. I'm not sure what it's called in Dreamweaver, however it's the same behaviour.

       

      Basically in DW CS4, if I were to write array() then in-between the brackets press enter, the closing bracket would automatically appear directly below the opening bracket.

       

      In DW CS5 this no longer happens. Now when you press enter, the closing bracket shoots to the very start of the line below. It means you have to tab the bracket in to line it up with the opening bracket.

       

      Such functionality is a feature of Flash Builder and you can turn it on/off. In CS5 there is no option.

       

      Anyone else noticed this?

        • 2. Re: DW CS5 - Functionality removed or is this a bug?
          Randy Edmunds Adobe Employee

          Basically in DW CS4, if I were to write array() then in-between the brackets press enter, the closing bracket would automatically appear directly below the opening bracket.

           

          In DW CS5 this no longer happens. Now when you press enter, the closing bracket shoots to the very start of the line below. It means you have to tab the bracket in to line it up with the opening bracket.

           

          This was removed on purpose. That behavior was annoying coders using the new code formatting used for jQuery and other frameworks. It starts like this:

           

            $(function(){

            });

           

          When you place the cursor at the end of the first line and press Enter, the expectation is to only insert a Tab on the new line (as opposed to lining up with the innermost "(" as you described).

           

          Unfortunately, there is not an option to switch back to the old behavior. The good news is that it only happens on first line, subsequent lines will be indented the same as the first line.

           

          Regards,

           

          Randy Edmunds

          Dreamweaver Development

          Adobe Systems, Inc.

          • 3. Re: DW CS5 - Functionality removed or is this a bug?
            RandomReado Level 1

            I see your point - I too found that annoying. Though only on the JS side.

             

            Thanks for the clarification.