I'm using emacs with evil and anaconda mode for Python.
Sometimes I'd like to convert a region or a block of selected lines into a
def (or for/while loop, or class). Is there a way to do this conveniently? Right now I have to adjust the indentation of the whole block and then add
def name(): at the top and
return at the bottom.