Visual studio code how to add a keybinding for a command palette entry

夙愿已清 提交于 2020-12-31 05:31:35

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!