问题
For example, I would like to add a key binding Ctrl+R Ctrl+T for the entry:
Python: Run Python File In Terminal
Many thanks.
回答1:
You can do that in the Preferences
-> Keyboard Shortcuts
section. Search for "Run Python File in Terminal", select the command and press the little +
sign on the left.
回答2:
You can start the process of creating a keybinding for a command in the command palette while in the command palette as of v1.52 (it is in the Insiders' Build now). A Gear
icon has been added on the right of each command that you hover over. Click it. (To not use the mouse, arrow down or type to your desired command, hit Tab Tab to focus the Gear icon and hit Enter). Demo:
来源:https://stackoverflow.com/questions/48387873/visual-studio-code-how-to-add-a-keybinding-for-a-command-palette-entry