Commenting blank lines

2019-07-09 11:17发布

问题:

When commenting multiple lines in vs-code using ctrl + /, is there any way to comment the blank lines in the selection too.

Example, if I have the following code,

def A():
    line1

    line2

When all these lines are selected and commented using ctrl + /, I want the blank line to get commented also, like

# def A():
#     line1
#      
#     line2

instead of:

# def A():
#     line1

#     line2