Wie man 'Remove unused imports'-Tastenkürzel zu Visual Studio Code hinzufügt
- Installieren Sie PyLance (VSCode-Erweiterung)
- Fügen Sie Folgendes zu Ihrer
keybindings.jsonhinzu (Ctrl-Shit-P -> “Preferences: Open Keyboard Shortcuts (JSON)”):
keybindings.json
,{
"key": "shift+alt+r",
"command": "editor.action.codeAction",
"args": {
"kind": "source.unusedImports",
}
}- Speichern, und Sie sind bereit
Inspiriert von diesem StackOverflow-Beitrag
Check out similar posts by category:
Visual Studio Code
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow