Yep, you can do it by setting a shortcut
editing keybindings.json
file. Pressing ctrl + k + s
(if you haven't changed before) you can open it and then type run python file in terminal
, then click on it and set the shortcut that you wanna press to run the current python file. I'm attaching an image to support the explanation.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…