https://code.visualstudio.com/docs/python/editing
Go to Definition F12 跳转到定义
Peek Definition Alt+F12 在当前页显示定义
抽取代码并定义
1.抽取并定义变量
Context Menu: right-click a selection and select Extract Variable.
Command Palette (Ctrl+Shift+P), then Python Refactor: Extract Variable.

2.抽取并定义方法
Context Menu: right-click a selection and select Extract Method.
Command Palette (Ctrl+Shift+P), then Python Refactor: Extract Method.

本文介绍了Visual Studio Code中Python编辑的高效技巧,包括使用F12跳转到定义,Alt+F12预览定义,以及如何通过上下文菜单或命令面板进行代码抽取和定义变量或方法的操作。
2313

被折叠的 条评论
为什么被折叠?



