VSCode Editing Code

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.
在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章