Search code examples
visual-studio-codesublimetext3brackets

VS Code Multi-Cursor Select to Brackets functionality


Is it possible to select multi cursor select to brackets altogether via single action?

e.g.

void func1(....){<Cursor1>
// Region 1
}

void func2(....){<Cursor2>
// Region 2
}

void func3(....){<Cursor3>
// Region 3
}

void func4(....){<Cursor4>
// Region 4
}

in those functions where the cursors are I would like to select all the code regions with a single action. Unfortunately select to brackets only selects one of the cursors. Is it possible to automate this somehow?

I am fine if it is possible to do it with other editors e.g.Brackets or Sublime Text 3 as well.


Solution

  • Have a look at the extension expand_region. It does what you want nicely.

    enter image description here