Select text with CTRL+SHIFT+M plus one or more line of code in Sublime Text

1

This is the sample code:

Class foo
{
  function one()
  {
    // lines of code
  }

  function two()
  {
    // lines of code
  }
}

I know that hitting CTRL+SHIFT+M inside the curly braces of function one() will select all text inside that brace.

I would like to select the function name along will all the text inside the curly brace. But instead, all the text within the curly brace of the whole class is selected.

Do we need a plugin to achieve this? or is there another way in ST by default that i should know of?

This is the text i want selected:

function one()
{
  // lines of code
}

These lines gets selected instead when i select the line function one() hold shift, move the cursor inside the curly brace and hit CTRL+SHIFT+M (which i don't want):

** The same is true with CTRL+SHIFT+SPACE

{
  function one()
  {
    // lines of code
  }

  function two()
  {
    // lines of code
  }
}

Jiego Cordoviz

Posted 2014-07-10T03:28:06.857

Reputation: 11

what language are you using? – MattDMo – 2014-07-10T12:20:11.957

i was hoping a configuration of the application for any language. Nevertheless, example languages for the sake of this question are PHP and JS. As an additional note for reference, the whole idea of question of this functionality came from one of netbeans' features/capability. – Jiego Cordoviz – 2014-08-18T04:36:57.220

No answers