Author Topic: smarttab formatting for actionscript  (Read 6775 times)

sean_kelly

  • Community Member
  • Posts: 6
  • Hero Points: 0
smarttab formatting for actionscript
« on: February 19, 2009, 06:42:10 PM »
I cannot seem to get smarttab in emacs emulation mode to do the right thing with function arguments spread across multiple lines - I always get the below

  public function judge(analyses:kdraw_list,
    size_index:Number,
    corr:Number,
    standard_margin:Number) : kdraw_response
    {


as opposed to

  public function judge(analyses:kdraw_list, 
                        size_index:Number,
                        corr:Number,
                        standard_margin:Number) : kdraw_response


Applying the beatify command to the selection produces the latter.  I do have "use continuation indent on function parameters" checked. 

Another issue with smart tab is it alway seems to indent curly braces n spaces irrespective of my style choice.

Thanks for any help.

Sean



SlickEdit Support

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 384
  • Hero Points: 29
Re: smarttab formatting for actionscript
« Reply #1 on: February 19, 2009, 08:16:10 PM »
Sean,

I have been able to reproduce the issue.  I have filed a defect against the issue.   The same issue exists in the full SlickEdit product as well.  I imagine that it has something to do with the :'s (colons) in the params. 
« Last Edit: February 19, 2009, 08:21:23 PM by Ashley »

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: smarttab formatting for actionscript
« Reply #2 on: February 27, 2009, 07:07:38 PM »
If you get the fixes attached here: http://community.slickedit.com/index.php?topic=4509.0 this should be fixed.  Note that in order to see the desired behavior when you hit ENTER at the end of following line:

Code: [Select]
public function judge(analyses:kdraw_list, <cursor here>

you actually want "Use continuation indent on function parameters" turned OFF.  This will put the cursor even with the open paren, lining up all the function parameters.

- Ryan