Implement "select code block"

codex 9 years ago 0
Other editors have a feature which allows one to select up the code block stack, e.g.

def foo():
if 1:
pass<cursor here>

On the first invocation, the current line is selected.  On second invocation, the entire if statement is selected.  On the third invocation, the entire function is selected.  Very useful.