Home Download Buy Blog Forum Support

Expand Selection to (curly) brackets?

Expand Selection to (curly) brackets?

Postby godbout on Fri Sep 09, 2011 9:27 am

Hi there!

Not sure whether it's a bug or a feature, but I can't make a selection the way I want now in ST2.

To give an example, here's my code:

Code: Select all
  /**
   * getUserSectionsList(user_id)
   *
   * @return list of sections for the user given in parameter in doctrine objects
   * @author
   **/   
  public static function getUserSectionsList($user_id)
  {
    return Doctrine_Query::create()
      ->from('ModuleSectionUser')
      ->where('user_id = ?' , array($user_id))
      ->execute();
  }


When I'm in the body of my function, I'd like to use a shortcut to select from 'return' to 'execute();' (to put those lines in comments in that case). I've tried using the Expand to Scope, Brackets and Paragraph but it never really does the work. Brackets should be the closest, but it includes the two curly brackets (where I think it shouldn't, at least at the first selection).

Anything I am missing? :)
godbout
 
Posts: 12
Joined: Fri Sep 09, 2011 9:18 am

Re: Expand Selection to (curly) brackets?

Postby adzenith on Fri Sep 09, 2011 11:02 pm

There's a new Expand Selection to Indentation command in the current dev build that will do what you want if you're on the line that says "return Doctrine_Query::create()". Other than that I don't know.
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: Expand Selection to (curly) brackets?

Postby godbout on Sun Sep 11, 2011 5:21 am

Hi!
Thanks for the answer. It works well in this particular case, but not if there are several paragraphs in the body of the function. Select by indentation works ALMOST fine, Select by paragraph also. Actually what is needed is a Selection that is a combination of the 2.
godbout
 
Posts: 12
Joined: Fri Sep 09, 2011 9:18 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 23 guests