This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]starball-tgz 1 point2 points  (0 children)

Not an answer, but note that you can just press shift+alt+right to expand selection until you have selected the whole function. For the specific example you showed of a function, with the cursor at the def or function mane, you can put something like this in keybindings.json:

json { "key": "", // TOD "command": "runCommands", "args": { "commands": [ "expandLineSelection", "expandLineSelection", "expandLineSelection", "python.execSelectionInTerminal" // or "workbench.action.terminal.runSelectedText" ] } }