I'm trying to use default vscode block selection (alt
+ shift
+ →
) but it doesn't work for python methods(it selects the whole first line and then go crazy and select whole file). I couldn't find any useful extension. do you have any suggestion?
Update:
as @jill-cheng said currently the best approach is to fold the block using Ctrl
+ Shift
+ [
and select the whole line using Ctrl
+ l
for folding shortcuts refer to https://stackoverflow.com/a/30077543/13877794
At present, vscode does not support automatic recognition and quick selection of Python function blocks.
Usually, this function is identified by the '{ }' of the function.
You could use the shortcut key 'Ctrl
+ L
' to select a single line of code. As for selecting the python function block, you can try to collapse it and select it.(Select until the cursor is on the next line.)
For more information:Key Bindings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With