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.
在這裏插入圖片描述

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